Merge pull request #13274 from ethereum/lsp-fix-include-path

lsp: Fixes initialization phase if `include-paths` was not set at all then also no error should be generated.
This commit is contained in:
Christian Parpart 2022-07-13 17:13:58 +02:00 committed by GitHub
commit ed039abb97
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -149,9 +149,11 @@ void LanguageServer::changeConfiguration(Json::Value const& _settings)
{
m_settingsObject = _settings;
Json::Value jsonIncludePaths = _settings["include-paths"];
int typeFailureCount = 0;
if (jsonIncludePaths && jsonIncludePaths.isArray())
if (jsonIncludePaths)
{
int typeFailureCount = 0;
if (jsonIncludePaths.isArray())
{
vector<boost::filesystem::path> includePaths;
for (Json::Value const& jsonPath: jsonIncludePaths)
@ -169,6 +171,7 @@ void LanguageServer::changeConfiguration(Json::Value const& _settings)
if (typeFailureCount)
m_client.trace("Invalid JSON configuration passed. \"include-paths\" must be an array of strings.");
}
}
void LanguageServer::compile()
{