-
Notifications
You must be signed in to change notification settings - Fork 153
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
SLI-1586 Sanitize preprocessorDefines
before giving it to the analyzer
#1160
Conversation
preprocessorDefines
before giving it to the analyzerpreprocessorDefines
before giving it to the analyzer
preprocessorDefines
before giving it to the analyzerpreprocessorDefines
before giving it to the analyzer
5102a4b
to
60839f5
Compare
60839f5
to
51fa676
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thanks for the contribution, it's really appreciated
class AnalyzerConfigurationTest { | ||
@Test | ||
void testPreprocessorDefines() { | ||
OCCompilerSettings compilerSettings = mock(OCCompilerSettings.class); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We use var
when possible
when(compilerSettings.getPreprocessorDefines()).thenReturn(List.of( | ||
"#define a b", "#define c d ", " #define e f ", " #define g h", " #define i j")); | ||
|
||
String preprocessorDefines = AnalyzerConfiguration.getPreprocessorDefines(compilerSettings); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
String preprocessorDefines = AnalyzerConfiguration.getPreprocessorDefines(compilerSettings); | |
var preprocessorDefines = AnalyzerConfiguration.getPreprocessorDefines(compilerSettings); |
Quality Gate passedIssues Measures |
SLI-1586