Skip to content

Conversation

@Takishima
Copy link

MRE:

cmake_minimum_required(VERSION 3.0)
project(test LANGUAGES CXX)

if(DEFINED ENV{CMAKE_CXX_COMPILER_LAUNCHER})
  message(STATUS "Hello World!")
endif()

Expected:

No warnings

Actual:

/tmp/CMakeLists.txt
===================
/tmp/CMakeLists.txt:04,11: [W0106] String looks like a variable reference missing an open tag '{CMAKE_CXX_COMPILER_LAUNCHER'

Summary
=======
files scanned: 1
found lint:
     Warning: 1

This PR addresses this by patching the LintChecker::check_tokens() function to check for cases where the first group of the match happens to be ENV{.

# test: missing-final-newline
# expect: C0304
# This file is missing a final newline
# This file is missing a final newline

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The commit adds newline and thus breaking the expected check.

ndam-hexagon

This comment was marked as off-topic.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants