Skip to content

Commit 20f790a

Browse files
Query format
1 parent ce6709d commit 20f790a

File tree

1 file changed

+5
-11
lines changed

1 file changed

+5
-11
lines changed

cpp/autosar/src/rules/A1-1-2/CompilerWarningLevelNotInCompliance.ql

Lines changed: 5 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -36,9 +36,7 @@ class CompilationWithNoWarnings extends Compilation {
3636
class CompilationArgument extends string {
3737
Compilation compilation;
3838

39-
CompilationArgument() {
40-
this = compilation.getAnArgument()
41-
}
39+
CompilationArgument() { this = compilation.getAnArgument() }
4240
}
4341

4442
/**
@@ -48,13 +46,11 @@ class EnableWarningFlag extends CompilationArgument {
4846
string warningType;
4947

5048
EnableWarningFlag() {
51-
warningType = regexpCapture("^-W([\\w-]+)(=.*)?$", 1)
52-
and not this instanceof DisableWarningFlag
49+
warningType = regexpCapture("^-W([\\w-]+)(=.*)?$", 1) and
50+
not this instanceof DisableWarningFlag
5351
}
5452

55-
string getWarningType() {
56-
result = warningType
57-
}
53+
string getWarningType() { result = warningType }
5854
}
5955

6056
/**
@@ -69,9 +65,7 @@ class DisableWarningFlag extends CompilationArgument {
6965
warningType = regexpCapture("^-W([\\w-]+)=0", 1)
7066
}
7167

72-
string getWarningType() {
73-
result = warningType
74-
}
68+
string getWarningType() { result = warningType }
7569
}
7670

7771
from File f

0 commit comments

Comments
 (0)