-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor: move
const
modifier info into style category (#621)
### Summary of Changes Move the info that the `const` modifier on annotation parameters can be removed to the style checker. --------- Co-authored-by: megalinter-bot <129584137+megalinter-bot@users.noreply.github.com>
- Loading branch information
1 parent
ed7953a
commit a51a644
Showing
10 changed files
with
66 additions
and
58 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
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
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
20 changes: 20 additions & 0 deletions
20
tests/resources/validation/other/declarations/parameters/const modifier/error.sdstest
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,20 @@ | ||
package tests.validation.other.declarations.parameters.illegalConstModifier | ||
|
||
fun f( | ||
g: ( | ||
// $TEST$ error "The const modifier is not applicable to parameters of callable types." | ||
»const« p1: Int | ||
) -> () | ||
) | ||
|
||
pipeline myPipeline { | ||
( | ||
// $TEST$ error "The const modifier is not applicable to parameters of lambdas." | ||
»const« p1: Int | ||
) {}; | ||
|
||
( | ||
// $TEST$ error "The const modifier is not applicable to parameters of lambdas." | ||
»const« p1: Int | ||
) -> 1; | ||
} |
37 changes: 0 additions & 37 deletions
37
tests/resources/validation/other/declarations/parameters/const modifier/main.sdstest
This file was deleted.
Oops, something went wrong.
13 changes: 13 additions & 0 deletions
13
tests/resources/validation/other/declarations/parameters/const modifier/no error.sdstest
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,13 @@ | ||
package tests.validation.other.declarations.parameters.illegalConstModifier | ||
|
||
// $TEST$ no error "The const modifier is not applicable to parameters of callable types." | ||
|
||
fun f( | ||
g: (p2: Int) -> () | ||
) | ||
|
||
pipeline myPipeline { | ||
(p2: Int) {}; | ||
|
||
(p2: Int) -> 1; | ||
} |
6 changes: 6 additions & 0 deletions
6
...esources/validation/style/unnecessary const modifier on annotation parameter/info.sdstest
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,6 @@ | ||
package tests.validation.style.unnecessaryConstModifierOnAnnotationParameters | ||
|
||
annotation MyAnnotation( | ||
// $TEST$ info "Annotation parameters are always const, so this modifier can be removed." | ||
»const« p1: Int | ||
) |
6 changes: 6 additions & 0 deletions
6
...urces/validation/style/unnecessary const modifier on annotation parameter/no info.sdstest
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,6 @@ | ||
package tests.validation.style.unnecessaryConstModifierOnAnnotationParameters | ||
|
||
annotation MyAnnotation( | ||
// $TEST$ no info "Annotation parameters are always const, so this modifier can be removed." | ||
p2: Int, | ||
) |