-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Don't treat missing value of one value keyword as an error
Since missing value might lead to StopIteration exception for now let's just allow that value to be missing. Previously it'd stop formating of remaining files in the batch. More details: PEP 479 Although it's an issue with incorrect CMake code rather than parsing/formatting such code nevertheless it'd be more of an annoyance in that case
- Loading branch information
1 parent
858e079
commit c21aa20
Showing
5 changed files
with
22 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
3 changes: 3 additions & 0 deletions
3
tests/formatter/missing_value_for_one_value_keyword_is_not_an_error.in.cmake
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
try_compile(FOO BAR BAZ OUTPUT_VARIABLE) | ||
|
||
try_compile(FOO__________________________________________________ BAR__________________________________________________ BAZ__________________________________________________ OUTPUT_VARIABLE) |
8 changes: 8 additions & 0 deletions
8
tests/formatter/missing_value_for_one_value_keyword_is_not_an_error.out.cmake
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
try_compile(FOO BAR BAZ OUTPUT_VARIABLE) | ||
|
||
try_compile( | ||
FOO__________________________________________________ | ||
BAR__________________________________________________ | ||
BAZ__________________________________________________ | ||
OUTPUT_VARIABLE | ||
) |