tomasbjerre / violations-lib Goto Github PK
View Code? Open in Web Editor NEWJava library for parsing report files from static code analysis.
License: Apache License 2.0
Java library for parsing report files from static code analysis.
License: Apache License 2.0
Hello,
Still found violation on unchanged lines as I have checked on the option "Comment only changed part of files"
See below comments from Gitlab Merge request, which reported the ERROR on L243.
Found 1 violations:
Reporter: CPPLint Rule: whitespace/parens
File: src/imageview/setting/image_setting_dlg.cpp L243
Missing space before ( in if(
Severity: ERROR
But as I checked the change diff from the Merge request, I found L243 was not changed at all. See below screenshot.
Is it possible to explain why it happens? Is this the right behaviour or not? why?
Thank you very much.
With cmdline option '--no_wrap_diagnostics' the reported problems are provided in a single line. Output is like following:
"c:\jenkins\workspace\24-Test-Jenkins-WinTen-Extension\external\specific\cpp\iar_cxxabi.cpp",432 Warning[Pe852]: expression must be a pointer to a complete object type
Instead of a warning, the following can occur as well: Error|Remark|Warning|Fatal [Ee]rror
As I remember, the Violations to Bitbucket Server plugin needs relative parts to repo root, something like this needs to be recognized (as well):
"external\specific\cpp\iar_cxxabi.cpp",432 Warning[Pe852]: expression must be a pointer to a complete object type
IAR compiler only works on Windows. I would also go with a solution where backslash has to be replaced by slash.
Seems that maven uses a format that is not compatible with your parser:
[INFO] --- maven-compiler-plugin:3.7.0:compile (default-compile) @ analysis-model ---
[INFO] Changes detected - recompiling the module!
[INFO] Compiling 143 source files to /Users/hafner/Development/jenkins/workspace/Model - Freestyle - New/target/classes
[WARNING] /Users/hafner/Development/jenkins/workspace/Model - Freestyle - New/src/main/java/edu/hm/hafner/analysis/parser/RobocopyParser.java:[29,45] [StringSplitter] String.split(String) has surprising behavior
(see http://errorprone.info/bugpattern/StringSplitter)
Did you mean 'String file = matcher.group(4).split("\\s{11}", -1)[0];'?
[INFO]
This warning is not picked up by the parser.
(Maven 3.5.2, violations-lib 1.54)
It would be nice to have google error-prone supported
https://github.com/google/error-prone
It'd be nice if instead of providing a folder and a pattern, I could just use a String. Something like:
String content = "foo report"
violationsApi()
.withContent(content)
.findAll(CHECKSTYLE)
.violations();
If you are asking for support of a new format, or if you are unable to parse a report:
http://puppet-lint.com/
Some samples on site.
Please provide example output of such a report.
ERROR: two-space soft tabs not used on line 181
ERROR: two-space soft tabs not used on line 182
ERROR: two-space soft tabs not used on line 183
ERROR: two-space soft tabs not used on line 184
ERROR: two-space soft tabs not used on line 185
WARNING: indentation of => is not properly aligned (expected in column 26, but found it in column 16) on line 40
WARNING: indentation of => is not properly aligned (expected in column 26, but found it in column 16) on line 62
WARNING: indentation of => is not properly aligned (expected in column 26, but found it in column 16) on line 84
WARNING: indentation of => is not properly aligned (expected in column 26, but found it in column 16) on line 106
WARNING: indentation of => is not properly aligned (expected in column 26, but found it in column 16) on line 128
I would like to be able to parse the output from my own homemade tool. Instead of adding a new parser to the library, the easiest thing would be if there was support for generic regex parsing. This is for example possible in the Jenkins warnings plugin.
What complicates things is that the regex parser requires a parameter, so it can't use the same interface as the other parsers. I have a suggestion for how to do this, but I'm not sure of it. I'll create a pull request.
Example CSSLint output:
...normal csslint file...
<csslint>
<file name="foo/bar/style.css>
<issue evidence="" reason="Too many !important declarations (38), try to use less than 10 to avoid specificity issues." severity="warning"/>
<issue evidence="" reason="Too many font-size declarations (35), abstraction needed." severity="warning"/>
<issue evidence="" reason="You have 5 h1s, 7 h2s, 5 h3s, 7 h4s, 2 h5s defined in this stylesheet." severity="warning"/>
</file>
</csslint>
This results in a Jenkins output:
Error when parsing /var/lib/jenkins/workspace/xxxxxx/css-results.xml as CSSLINT
java.lang.RuntimeException: "line" not found in "<issue severity="warning" reason="Too many !important declarations (38), try to use less than 10 to avoid specificity issues." evidence=""/>"
at se.bjurr.violations.lib.parsers.ViolationParserUtils.getAttribute(ViolationParserUtils.java:73)
at se.bjurr.violations.lib.parsers.ViolationParserUtils.getIntegerAttribute(ViolationParserUtils.java:113)
at se.bjurr.violations.lib.parsers.CSSLintParser.parseFile(CSSLintParser.java:35)
at se.bjurr.violations.lib.reports.Reporter.findViolations(Reporter.java:58)
at se.bjurr.violations.lib.ViolationsReporterApi.violations(ViolationsReporterApi.java:53)
at org.jenkinsci.plugins.jvctb.perform.JvctbPerformer.doPerform(JvctbPerformer.java:66)
at org.jenkinsci.plugins.jvctb.perform.JvctbPerformer$1.invoke(JvctbPerformer.java:124)
at org.jenkinsci.plugins.jvctb.perform.JvctbPerformer$1.invoke(JvctbPerformer.java:111)
at hudson.FilePath.act(FilePath.java:1018)
at hudson.FilePath.act(FilePath.java:996)
at org.jenkinsci.plugins.jvctb.perform.JvctbPerformer.jvctsPerform(JvctbPerformer.java:111)
at org.jenkinsci.plugins.jvctb.ViolationsToBitbucketServerRecorder.perform(ViolationsToBitbucketServerRecorder.java:61)
at org.jenkinsci.plugins.workflow.steps.CoreStep$Execution.run(CoreStep.java:69)
at org.jenkinsci.plugins.workflow.steps.CoreStep$Execution.run(CoreStep.java:59)
at org.jenkinsci.plugins.workflow.steps.AbstractSynchronousNonBlockingStepExecution$1$1.call(AbstractSynchronousNonBlockingStepExecution.java:52)
at hudson.security.ACL.impersonate(ACL.java:221)
at org.jenkinsci.plugins.workflow.steps.AbstractSynchronousNonBlockingStepExecution$1.run(AbstractSynchronousNonBlockingStepExecution.java:49)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
at java.util.concurrent.FutureTask.run(FutureTask.java:262)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:745)
Hello Tomas,
I think there is an issue with the pylint (or flake8?) parser. I'm having the following concerns being raised by pylint,
legacy_data/interface.py:26: [W0102(dangerous-default-value), get_data] Dangerous default value {} as argument
legacy_data/fake_models.py:106: [C0330(bad-continuation), ] Wrong hanging indentation (remove 1 space).
legacy_data/fake_models.py:323: [R0912(too-many-branches), set_flight_partialpayment] Too many branches (13/12)
And, try as I might, I can't seem to get the Violation Comments to GitHub Jenkins Plugin to write comments on my pull requests. Investigating the issue, I think its because the format of my reports does not match what you have on the regex. Specifically here,
Now, I'm not going to ask that you change the regex (though it would be highly appreciated!), I would like some help in figuring it out. With a lot of trial-and-error I kind-of figured out that if I use the following as my msg template in pylint,
msg-template='{path}:{line}:{column} {msg_id} {msg}'
it should match the regex. Here are some sample messages I got for the above,
legacy_data/interface.py:54:12 C0103 Invalid variable name "r"
legacy_data/interface.py:71:0 W0102 Dangerous default value {} as argument
legacy_data/fake_models.py:323:0 R0912 Too many branches (13/12)
legacy_data/fake_models.py:475:11 W0703 Catching too general exception Exception
At least, the online java regex testers says that I got it right. But the comments to github plugin does not detect anything. On jenkins log, it says that it found 0 violations. Which should not be the case.
Can you please help me figure out how to format the lines from pylint?
https://pypi.python.org/pypi/mypy-lang is static checker for python 3 type annotations. Example output:
fs/cs/backend/log.py: note: In member "filter" of class "CsLogFilter":
fs/cs/backend/log.py:16: error: "LogRecord" has no attribute "user_uuid"
fs/cs/backend/log.py:17: error: "LogRecord" has no attribute "tenant_id"
fs/cs/backend/errorhandler.py: note: In member "__init__" of class "CsErrorHandler":
fs/cs/backend/errorhandler.py:16: error: The return type of "__init__" must be None
fs/cs/backend/api.py: note: At top level:
fs/cs/backend/api.py:23: error: ContextManager[Any] not callable
tests/test_schema.py:864: error: Name 'test_nested_only_and_exclude' already defined
I have used ^(.*):(\d+): (.*): (.*)$
regex with warning plugin:
String fileName = matcher.group(1)
String lineNumber = matcher.group(2)
String category = matcher.group(3)
String message = matcher.group(4)
Please support parsing the output of golint.
I've been testing out Gradle 5.0-rc-1, and KotlinGradleParser is no longer working. The output has changed to this format:
utils/src/main/kotlin/com/somepackage/WebView.kt:38:9: warning: 'setter for pluginState: WebSettings.PluginState!' is deprecated. Deprecated in Java
I don't know if it's worth supporting this before Gradle 5.0 is released, but I'll leave this here as a todo.
Hi!
I'm having an issue with parsing checkstyle files coming from phpstan using this lib, as their errors don't have the source
attribute, which makes this lib log an error and ignore the violation.
Would it be possible to consider the source as optional?
I am also opening an issue on phpstan to add the source attribute, as I am not sure which fix would be better.
I see there's some parsing of other compiler outputs, so I figure it wouldn't be too difficult to add this.
Example:
w: /Users/scottkennedy/project/src/main/java/com/example/Test.kt: (13, 87): Elvis operator (?:) always returns the left operand of non-nullable type String
https://pypi.python.org/pypi/pydocstyle is static checker for python docstrings. Example output:
fs/csm/admin_api/ui_api.py:1 at module level:
D100: Missing docstring in public module
fs/csm/admin_api/main.py:1 at module level:
D100: Missing docstring in public module
fs/csm/admin_api/dao.py:1 at module level:
D100: Missing docstring in public module
fs/csm/admin_api/dao.py:8 in public class `Dao`:
D101: Missing docstring in public class
fs/csm/admin_api/admin_api.py:1 at module level:
D100: Missing docstring in public module
fs/csm/admin_api/admin_api.py:34 in public function `x_debug_check`:
D103: Missing docstring in public function
fs/csm/admin_api/admin_api.py:40 in public class `NewNodeSchema`:
D101: Missing docstring in public class
fs/csm/admin_api/admin_api.py:227 in public class `NewChildNodeSchema`:
D101: Missing docstring in public class
fs/csm/admin_api/admin_api.py:463 in public class `NewParentNodeSchema`:
D101: Missing docstring in public class
fs/csm/admin_api/admin_api.py:614 in public class `PatchNodeSchema`:
D101: Missing docstring in public class
fs/csm/admin_api/settings.py:1 at module level:
D100: Missing docstring in public module
fs/csm/admin_api/settings.py:12 in public class `SettingsService`:
D101: Missing docstring in public class
fs/csm/admin_api/settings.py:14 in public method `try_create_root_node`:
D102: Missing docstring in public method
fs/csm/admin_api/settings.py:26 in public method `try_create_child_node`:
D102: Missing docstring in public method
fs/csm/admin_api/settings.py:43 in public method `try_create_parent_node`:
D102: Missing docstring in public method
fs/csm/admin_api/sphinx.py:1 at module level:
D100: Missing docstring in public module
fs/csm/admin_api/auth.py:1 at module level:
D100: Missing docstring in public module
fs/csm/admin_api/auth.py:20 in public method `__init__`:
D102: Missing docstring in public method
fs/csm/admin_api/auth.py:25 in public method `__str__`:
D105: Missing docstring in magic method
fs/csm/admin_api/auth.py:38 in public method `authorize`:
D102: Missing docstring in public method
fs/csm/admin_api/auth.py:73 in public class `OAuth2Resolver`:
D101: Missing docstring in public class
fs/csm/admin_api/auth.py:126 in public class `AdminApiResolver`:
D101: Missing docstring in public class
fs/csm/admin_api/auth.py:128 in public method `__init__`:
D102: Missing docstring in public method
fs/csm/admin_api/auth.py:131 in public method `configure`:
D102: Missing docstring in public method
fs/csm/admin_api/auth.py:134 in public method `auth`:
D102: Missing docstring in public method
fs/csm/admin_api/auth.py:137 in public method `resolve`:
D102: Missing docstring in public method
fs/csm/admin_api/__init__.py:1 at module level:
D104: Missing docstring in public package
fs/csm/admin_api/application.py:1 at module level:
D100: Missing docstring in public module
fs/csm/admin_api/application.py:46 in public function `build_app`:
D103: Missing docstring in public function
fs/csm/admin_api/wsgi.py:1 at module level:
D100: Missing docstring in public module
fs/csm/admin_api/test/conftest.py:1 at module level:
D100: Missing docstring in public module
fs/csm/admin_api/test/conftest.py:18 in public function `admin_api_wsgi`:
D103: Missing docstring in public function
fs/csm/admin_api/test/__init__.py:1 at module level:
D104: Missing docstring in public package
Different errors for same line should be reported in separate "tuple":
So this is not possible:
fs/csm/admin_api/test/__init__.py:1 at module level:
D104: Missing docstring in public package
D105: Another error...
I have used regex ^(.*):(\d+) (.*):\n\s*(.*): (.*)$
to catch these with warnings plugin.
I should have filed tomasbjerre/violations-gradle-plugin#4 here since it looks like the issue is in the library not the plugin, here's a copy/paste of the original issue:
╠════════════╪═════════════════════════════════════════════════════════════════╪══════════╪══════╪═════════════════════════════════════════════════════════════════════╣
║ Checkstyle │ com.puppycrawl.tools.checkstyle.checks.imports.ImportOrderCheck │ ERROR │ 6 │ Wrong order for 'android.content.ContentResolver' import. ║
╚════════════╧═════════════════════════════════════════════════════════════════╧══════════╧══════╧═════════════════════════════════════════════════════════════════════╝
It's probably possible to render them as expected, if nothing else by just replacing the few special characters xml seems to allow: http://xml.silmaril.ie/specials.html.
Resharper includes a WikiUrl attribute on some IssueTypes, as seen in the Resharper test xml file:
https://github.com/tomasbjerre/violations-lib/blob/master/src/test/resources/resharper/main.xml#L12
I am a user of your Violations to Bitbucket Server plugin, and was wondering if you would be interested in adding support for a URL in the comment, if the report file includes one, otherwise comment as-is. Maybe something like this for Resharper's case:
If you're interested in this as an enhancement I could do some work on it, probably starting by adding this to the Violation model. Will likely need some code review, as I'm not a Java dev, but I don't get offended. :)
Thanks again!
Add them to if possible:
https://github.com/tomasbjerre/violations-test/
Some different formats can be found here:
https://github.com/jenkinsci/violations-plugin/tree/master/src/test/resources/hudson/plugins/violations/types
Suggestions for new formats are welcome! Please supply an example report file and/or an example on how to create the report file.
It would be nice to have support for the Error Prone's plugin NullAway. It is getting really popular and is quite useful to help eliminate NullPointerException
.
The console output looks like this:
:sample:compileReleaseNdk NO-SOURCE
:sample:processReleaseJavaRes NO-SOURCE
/home/travis/build/leinardi/FloatingActionButtonSpeedDial/library/src/main/java/com/leinardi/android/speeddial/SpeedDialActionItem.java:162: error: [NullAway] initializer method does not guarantee @NonNull field mLabel is initialized along all control-flow paths (remember to check for exceptions or early returns).
public Builder(@IdRes int id, @DrawableRes int fabImageResource) {
^
(see http://t.uber.com/nullaway )
/home/travis/build/leinardi/FloatingActionButtonSpeedDial/library/src/main/java/com/leinardi/android/speeddial/SpeedDialActionItem.java:175: error: [NullAway] initializer method does not guarantee @NonNull field mLabel is initialized along all control-flow paths (remember to check for exceptions or early returns).
public Builder(@IdRes int id, @Nullable Drawable drawable) {
^
(see http://t.uber.com/nullaway )
2 errors
My guess is that shouldn't be too different to parse than the base Error Prone error.
I'm getting an error on the Flake8 parser on this log: flake8-failure.log
java.lang.NumberFormatException: null
at java.base/java.lang.Integer.parseInt(Integer.java:614)
at java.base/java.lang.Integer.parseInt(Integer.java:770)
at se.bjurr.violations.lib.parsers.Flake8Parser.parseReportOutput(Flake8Parser.java:32)
at com.spotify.dredd.judges.Flake8Judge.judge(Flake8Judge.java:38)
at CheckstyleJudgeTest.flake8Error(CheckstyleJudgeTest.java:39)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:566)
at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:50)
at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:47)
at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:325)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:78)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:57)
at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)
at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71)
at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288)
at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58)
at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268)
at org.junit.runners.ParentRunner.run(ParentRunner.java:363)
at org.junit.runner.JUnitCore.run(JUnitCore.java:137)
at com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:68)
at com.intellij.rt.execution.junit.IdeaTestRunner$Repeater.startRunnerWithArgs(IdeaTestRunner.java:47)
at com.intellij.rt.execution.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:242)
at com.intellij.rt.execution.junit.JUnitStarter.main(JUnitStarter.java:70)
It seems like the last line is causing it. When I remove it I see a lot of non-flake8 violations being reported, such as this screenshot:
Hi, the idea is to be able to recognize compiler warnings as well. Compiler warnings can also be seen as static code analysis results providing valuable hints where problems can hide.
In an environment of continuous integration, various builds with different compiler flags can be executed ending in possibly different warnings. Also compilation with different compilers may be necessary. Adding support for compiler warnings in this lib would eliminate the need to compile these things manually and enable to comment on pull requests for compiler warnings (Bitbucket Server in my case).
In detail, as I am working on C++ projects, I am very interested in support for GCC compiler and Doxygen generation warnings.
Flake8 parser only reports numerical part of rule ids (e.g. PyLint correctly reports all letters and digits and even rule names as it should). Example:
Reporter: Flake8
Rule: 265
Severity: ERROR
File: src/aim/init.py L5
block comment should start with '# '
Reporter: Flake8
Rule: 302
Severity: ERROR
File: src/aim/init.py L6
expected 2 blank lines, found 0
src/aim/__init__.py:5:1: E265 block comment should start with '# '
src/aim/__init__.py:6:1: E302 expected 2 blank lines, found 0
As you can see E265
becomes just 265
. Those leading letters are sometimes extremely relevant (they are usually different for different tools flake8 wraps). Can someone please fix it or at least point me to where I should look (though I'm not very experienced with java this is probably simple enough).
Hi, I use the Violations Comments to Bitbucket Server plug-in with cpplint. However, the plug-in does not find any violations. Below the configuration:
The file 'cpplint-result.xml' is located directly in the workspace. Content of the file is similar to the test file (https://github.com/tomasbjerre/violations-lib/blob/master/src/test/resources/cpplint/cpplint.txt):
pump/src/gui/controls/List/Group.cpp:175: Tab found; better to use spaces [whitespace/tab] [1]
pump/src/gui/controls/List/Group.cpp:176: Tab found; better to use spaces [whitespace/tab] [1]
pump/src/gui/controls/List/Group.cpp:177: Tab found; better to use spaces [whitespace/tab] [1]
pump/src/gui/controls/List/Group.cpp:178: Tab found; better to use spaces [whitespace/tab] [1]
pump/src/gui/controls/List/Group.cpp:253: Add #include <utility> for pair<> [build/include_what_you_use] [4]
The paths are relative to the workspace. Any idea what the problem might be?
The PyDocStyleParser has a problem with some files:
IndexOutOfBoundsException: Index: 0, Size: 0
java.lang.IndexOutOfBoundsException: Index: 0, Size: 0
at java.util.ArrayList.rangeCheck(ArrayList.java:657)
at java.util.ArrayList.get(ArrayList.java:433)
at se.bjurr.violations.lib.parsers.PyDocStyleParser.parseReportOutput(PyDocStyleParser.java:26)
at
Should be part of violations-lib 1.93.
See related issue in Jenkins Warnings plugin: https://issues.jenkins-ci.org/browse/JENKINS-57799. I already pinged the reporter of the Jenkins issue to provide an example file...
ErrorProne parser is showing up some false positives in logs that aren't even from java builds, like in this scala log: https://gist.github.com/henriquetruta/00f851e1a88e371140d7be337eaecd2d
it picked up an error with startLine/endLine 6
It also generated 3 violations on this other scala build: https://gist.github.com/henriquetruta/d6e46355539609415ab8ad738192a46e
@tomasbjerre, I have a general question: in the short description you write "... from static code analysis". What about all the other scanners used today? Security scanners, container scanners, scanners checking the architecture rules, ... are these scanners out of scope of your project? If not, which I hope so, how do you handle the extensibility? At first glance, I don't see any kind of a "plugin mechanism" to add more parsers to the classpath. Thanks, Lars
I'm using your CppCheck parser in Jenkins Warnings plugin to read cppcheck files. In your parser you are converting each "location" of the original error structure to a violation. Actually each error should be converted to one violation only. Your violations should also provide a concept of multiple locations per violation (see SonarQube or Warning Plugin for an example).
See original Jenkins bug report.
Currently the Error Prone parser is reporting also the checkstyle errors. This is a problem for 2 reasons:
This mean that if I have 1 error and 2 variants I get 3 reports of the same error (and with 3 errors and 5 variants I get 18 reports where only 3 are unique errors and the rest are just duplicates).
Checkstyle build output:
:library:checkstyleDebug[ant:checkstyle] [ERROR] /home/travis/build/leinardi/FloatingActionButtonSpeedDial/library/src/main/java/com/leinardi/android/speeddial/FabWithLabelView.java:207:9: '{' at column 9 should be on the previous line. [LeftCurly]
FAILED
:library:checkstyleRelease[ant:checkstyle] [ERROR] /home/travis/build/leinardi/FloatingActionButtonSpeedDial/library/src/main/java/com/leinardi/android/speeddial/FabWithLabelView.java:207:9: '{' at column 9 should be on the previous line. [LeftCurly]
FAILED
Full build source: https://travis-ci.org/leinardi/FloatingActionButtonSpeedDial/builds/365085225?utm_source=github_status&utm_medium=notification
This will crash:
<?xml version="1.0" encoding="UTF-8"?>
<pmd version="5.2.3" timestamp="2017-11-22T16:58:52.128">
<file name="/home/cm/prod/workspace/applikation-mr-pipeline@3/applikation-web/src/main/java/pkg/applikation/application/Some.java">
<violation beginline="1" endline="149" begincolumn="1" endcolumn="3" rule="ApplicationAccessLimit" ruleset="" package="se.sjv.applikation.application" priority="1">
Applikationslagret får inte kommunicera uppåt.
</violation>
</file>
<file name="/home/cm/prod/workspace/applikation-mr-pipeline@3/applikation-web/src/main/java/pkg/applikation/application/rest/RESTBeanTest.java">
<violation beginline="195" endline="195" begincolumn="13" endcolumn="29" rule="printStackTrace" ruleset="" package="se.sjv.applikation.application.rest" class="RESTBeanTest" method="doTheCall" priority="1">
printStackTrace ska ersättas med korrekt loggning.
</violation>
<violation beginline="199" endline="199" begincolumn="13" endcolumn="29" rule="printStackTrace" ruleset="" package="se.sjv.applikation.application.rest" class="RESTBeanTest" method="doTheCall" priority="1">
printStackTrace ska ersättas med korrekt loggning.
</violation>
</file>
</file>
</pmd>
Should also use the message within the violation-tag.
It would be great if detekt
(https://github.com/arturbosch/detekt) would be supported. A sample output can be found here:
https://github.com/arturbosch/detekt/blob/master/reports/report.detekt
uses
String id = getAttribute(issueChunk, "id");
String rule = getAttribute(issueChunk, "category");
...
.setRule(rule)
.setMessage(id + ": " + summary + "\n" + message + "\n" + explanation)
notice that the category is used for rule, which is wrong. The rule should be the ID as that's what's failed, category is like "Accessibility" which category can have 10 different rules inside it.
What can we do?
Output is like the following:
../../source/gui/controls/DebugPrint.cpp(30): warning C4311: "Typumwandlung": Zeigerverkrzung von "void *" zu "long"
Relative to repo root it would be
source/gui/controls/DebugPrint.cpp(30): warning C4311: "Typumwandlung": Zeigerverkrzung von "void *" zu "long"
My proposal:
(.*)\((\d+)\): (warning.*)
(.*)\((\d+)\): ((?:fatal |)error.*)
Please add support for SonarQube preview report.
SonarQube has GitLab plugin but it seem it does not work in SonarQube Community edition.
Here is format of sonar report:
File name pattern: .*/target/sonar/sonar-report\.json
File content example (in pretty format):
{
"version":"6.7.4.38452",
"issues": [{
"key": "AfhgjhgUhjhkhkOqm3c-",
"component": "com.example:myapp:src/main/java/com/example/myapp/App.java",
"line": 28,
"startLine": 28,
"endLine": 28,
"message": "Complete the task associated to this TODO comment.",
"severity": "INFO",
"rule": "squid:S1135",
"status": "OPEN",
"isNew": false,
"creationDate": "2019-01-01T11:12:13+0900"
}, {
...
}],
...
}
It would be great to support Facebook Infer: http://fbinfer.com/ It generates a bugs.txt, report.csv and report.json. Here you can find the files generated from the example Android project:
bugs.txt
report.csv
report.json
If you are asking for support of a new format, or if you are unable to parse a report:
https://www.puppetcookbook.com/posts/erb-template-validation.html
Please provide example output of such a report.
-:79: unknown regexp options - appl
-:79: syntax error, unexpected '<'
...WLTempDir /var/appl/logs/dir/<%= scope['scope_sites::...
... ^
-:91: syntax error, unexpected keyword_do_block, expecting ')'
...:wlproxy_inxe_ms'].sort.each do |priority, hosts|
... ^
-:91: syntax error, unexpected '|', expecting '='
-:92: syntax error, unexpected keyword_do_block, expecting ')'
hosts.sort.each do |i|
^
-:94: syntax error, unexpected keyword_end, expecting ')'
-:349: syntax error, unexpected keyword_do_block, expecting end-of-input
...::static_content_dirs'].each do |path|
...
Hi,
I use Violations Comments to GitLab plugin with cpplint. But the plugin find 0 violations.
cpplint.xml is located directly in the workspace with below content:
17:24:17 src/utility/utility.h:15: Tab found; better to use spaces [whitespace/tab] [1]
17:24:17 src/utility/utility.h:17: Tab found; better to use spaces [whitespace/tab] [1]
17:24:17 src/utility/utility.h:30: Tab found; better to use spaces [whitespace/tab] [1]
below is the ViolationConfig
17:24:18 gitLabUrl: http://gitlab.xxxx.domain
17:24:18 projectId: 33938
17:24:18 mergeRequestIid: 163
17:24:18 apiToken: true
17:24:18 apiTokenCredentialsId: false
17:24:18 ignoreCertificateErrors: true
17:24:18 apiTokenPrivate: true
17:24:18 authMethodHeader: true
17:24:18 createCommentWithAllSingleFileComments: true
17:24:18 createSingleFileComments: false
17:24:18 commentOnlyChangedContent: true
17:24:18 maxNumberOfViolations:99999
17:24:18 minSeverity: INFO
17:24:18 keepOldComments: true
17:24:18 shouldSetWip: true
17:24:18 commentTemplate:
17:24:18 proxyUri:
17:24:18 proxyUser: no
17:24:18 proxyPassword: no
17:24:18 CPPLINT with pattern .*cpplint.xml$
17:24:18 Running Violation Comments To GitLab
17:24:18 Merge request: 163
17:24:18 Workspace: F:\Jenkins\workspace\static_check
17:24:18 Found 0 violations from ViolationConfig [pattern=.*cpplint.xml$, parser=CPPLINT, reporter=CPPLint].
One more thing, I tried Pylint, which can works correctly and can comments successfully to GitLab. So there should be no proxy, connection issue itself.
I googled from the internet, but cannot find any valuable to fix it.
Any idea what the problem might be? Or anything I configured wrong?
Hello,
I'm currently trying to integrate Sonar report parser.
Unfortunatly when issue level is not marchy Severity enum then its fallback to INFO, which is not very usefull when I want to only report the equivalent of WARN level.
From Sonar documentation, here are the existing levels are blocker, critical, major, minor, info.
Is it possible to convert level between Sonar -> violation lib?
If the assumption is to stay with the same existing levels, my proposal would be:
info, minor => INFO
major, critical => WARN
blocker => ERROR
Line 51 does:
List<String> sourceLineChunks = getChunks(bugInstanceChunk, "<SourceLine", "/>");
This does not match the following valid xml
<SourceLine classname='com.mycompany.app.App' start='7' end='30' sourcepath='com/mycompany/app/App.java' sourcefile='App.java'><Message>At App.java:[lines 7-30]</Message></SourceLine>
I'd imagine an XML Pull Parser may be an easier way to extract this sort of stuff..
I have a GCC warning. However, the compiler warning is not shown/commented in the PR.
I also use the warnings plugin to create a Jenkins internal report. I use both plugins with the same output files of GCC, and in the warnings plugin it is identified and resolved correctly. So the path in total is correct.
In contrast to the other output logs I use, I know that this has relative parts in its path, e.g. /foo/bar/../foobar.cpp. I don't know if Bitbucket can handle such a path, does the plugin resolve it before invoking the url?
On the CodeNarc Website there is an example file CodeNarc-Example which includes the Element "SourceDirectory", which is filled by CodeNarc. The "path" attribute is not filled. The current implementation of CodeNarcParser here respects only the path-attribute but ignores the "SourceDirectory". In our multi project builds using gradle this results in source files not being found.
I would suggest to prepend the path + name with the text-content of SourceDirectory.
https://github.com/jenkinsci/violation-comments-to-stash-plugin
The regex here appears to be excluding ansible lint formatting that is specified in the readme table. While its close to the FLAKE8 format this regex appears to only be looking for one letter then the number code for the error code. Ansible formats it as EANSIBLE.
some/script.yml:25: [EANSIBLE0012] Commands should not change things if nothing needs doing
Would suggest updating regex to be:
([^:]):(\d+)?:?(\d)?:? \[?(\D)+(\d*)\]? (.*)
I'm building an Android app, so while Kotlin is a big part of the build process, it's not the only part.
Here are some lines being matched by KotlinGradleParser
that are not related to Kotlin:
/opt/projectdir/src/debug/AndroidManifest.xml:20:5-21:31 Warning:
/opt/projectdir/src/main/AndroidManifest.xml:9:5-11:31 Warning:
/opt/projectdir/src/main/AndroidManifest.xml:24:5-50:19 Warning:
/opt/projectdir/src/main/AndroidManifest.xml:24:5-50:19 Warning:
/opt/projectdir/src/main/AndroidManifest.xml:13:5-15:31 Warning:
Found android support method: Landroid/support/v4/app/ListFragment$2;.onItemClick:(Landroid/widget/AdapterView;Landroid/view/View;IJ)V. Skipping instrumentation.
Found android support method: Landroid/support/v7/app/AlertController$AlertParams$3;.onItemClick:(Landroid/widget/AdapterView;Landroid/view/View;IJ)V. Skipping instrumentation.
Found android support method: Landroid/support/v7/app/AlertController$AlertParams$4;.onItemClick:(Landroid/widget/AdapterView;Landroid/view/View;IJ)V. Skipping instrumentation.
Found android support method: Landroid/support/v7/widget/AppCompatSpinner$DropdownPopup$1;.onItemClick:(Landroid/widget/AdapterView;Landroid/view/View;IJ)V. Skipping instrumentation.
Found android support method: Landroid/support/v7/widget/SearchView$8;.onItemClick:(Landroid/widget/AdapterView;Landroid/view/View;IJ)V. Skipping instrumentation.
Found android support method: Landroid/support/v7/preference/DropDownPreference$1;.onItemSelected:(Landroid/widget/AdapterView;Landroid/view/View;IJ)V. Skipping instrumentation.
Found android support method: Landroid/support/v7/widget/ListPopupWindow$3;.onItemSelected:(Landroid/widget/AdapterView;Landroid/view/View;IJ)V. Skipping instrumentation.
Found android support method: Landroid/support/v7/widget/SearchView$9;.onItemSelected:(Landroid/widget/AdapterView;Landroid/view/View;IJ)V. Skipping instrumentation.
Found android support method: Landroid/support/v14/preference/ListPreferenceDialogFragment$1;.onClick:(Landroid/content/DialogInterface;I)V. Skipping instrumentation.
Found android support method: Landroid/support/v7/preference/ListPreferenceDialogFragmentCompat$1;.onClick:(Landroid/content/DialogInterface;I)V. Skipping instrumentation.
Found android support method: Landroid/support/v4/view/PagerTabStrip$1;.onClick:(Landroid/view/View;)V. Skipping instrumentation.
Found android support method: Landroid/support/v4/view/PagerTabStrip$2;.onClick:(Landroid/view/View;)V. Skipping instrumentation.
Found android support method: Landroid/support/v7/app/ActionBarDrawerToggle$1;.onClick:(Landroid/view/View;)V. Skipping instrumentation.
Found android support method: Landroid/support/v7/app/AlertController$1;.onClick:(Landroid/view/View;)V. Skipping instrumentation.
Found android support method: Landroid/support/v7/preference/Preference$1;.onClick:(Landroid/view/View;)V. Skipping instrumentation.
Found android support method: Landroid/support/v7/widget/ActionBarContextView$1;.onClick:(Landroid/view/View;)V. Skipping instrumentation.
Found android support method: Landroid/support/v7/widget/SearchView$5;.onClick:(Landroid/view/View;)V. Skipping instrumentation.
Found android support method: Landroid/support/v7/widget/Toolbar$3;.onClick:(Landroid/view/View;)V. Skipping instrumentation.
Found android support method: Landroid/support/v7/widget/ToolbarWidgetWrapper$1;.onClick:(Landroid/view/View;)V. Skipping instrumentation.
Here are some that are related to Kotlin (and are being matched - harder for me to check for false negatives at the moment):
w: /root/.gradle/caches/modules-2/files-2.1/org.jetbrains.kotlin/kotlin-stdlib-jre7/1.2.41/9e7a6f582de73d9cdc6c56ef4e23604a0ee55768/kotlin-stdlib-jre7-1.2.41.jar: kotlin-stdlib-jre7 is deprecated. Please use kotlin-stdlib-jdk7 instead
w: /root/.gradle/caches/modules-2/files-2.1/org.jetbrains.kotlin/kotlin-stdlib-jre8/1.2.41/7b389de81710eb609752953f38ad6e7de2927292/kotlin-stdlib-jre8-1.2.41.jar: kotlin-stdlib-jre8 is deprecated. Please use kotlin-stdlib-jdk8 instead
w: /opt/projectdir/src/main/java/SomeFile.kt: (39, 97): Parameter 'methodName' is never used
w: /opt/projectdir/src/main/java/SomeFile.kt: (48, 19): Parameter 'reason' is never used
w: /opt/projectdir/src/main/java/SomeFile.kt: (14, 44): 'getResources(): Resources' is deprecated. Use a Context from an active View to ensure the correct resource is loaded.
w: /opt/projectdir/src/main/java/SomeFile.kt: (7, 10): Parameter 'reason' is never used
w: /opt/projectdir/src/main/java/SomeFile.kt: (31, 73): Type mismatch: inferred type is String? but String was expected
w: /opt/projectdir/src/main/java/SomeFile.kt: (46, 78): Type mismatch: inferred type is MutableSet<String!>? but Set<String> was expected
w: /opt/projectdir/src/main/java/SomeFile.kt: (41, 9): 'setter for pluginState: WebSettings.PluginState!' is deprecated. Deprecated in Java
w: /opt/projectdir/src/main/java/SomeFile.kt: (290, 47): 'getColor(Int): Int' is deprecated. Deprecated in Java
w: /opt/projectdir/src/main/java/SomeFile.kt: (353, 59): 'getColor(Int): Int' is deprecated. Deprecated in Java
w: /opt/projectdir/src/main/java/SomeFile.kt: (358, 71): 'getColor(Int): Int' is deprecated. Deprecated in Java
w: /opt/projectdir/src/main/java/SomeFile.kt: (378, 66): 'getColor(Int): Int' is deprecated. Deprecated in Java
w: /opt/projectdir/src/main/java/SomeFile.kt: (96, 47): 'getColor(Int): Int' is deprecated. Deprecated in Java
w: /opt/projectdir/src/main/java/SomeFile.kt: (12, 62): 'getColor(Int): Int' is deprecated. Deprecated in Java
w: /opt/projectdir/src/main/java/SomeFile.kt: (19, 62): 'getColor(Int): Int' is deprecated. Deprecated in Java
w: /opt/projectdir/src/main/java/SomeFile.kt: (94, 47): 'getColor(Int): Int' is deprecated. Deprecated in Java
w: /opt/projectdir/src/main/java/SomeFile.kt: (18, 27): Unsafe use of a nullable receiver of type CreatePopUpDialogContent?
w: /opt/projectdir/src/main/java/SomeFile.kt: (19, 29): Unsafe use of a nullable receiver of type CreatePopUpDialogContent?
w: /opt/projectdir/src/main/java/SomeFile.kt: (69, 13): Unsafe use of a nullable receiver of type AdapterView.OnItemSelectedListener?
w: /opt/projectdir/src/main/java/SomeFile.kt: (115, 24): 'setVisible(): Unit' is deprecated. Use Android KTX - `.isVisible = true`
w: /opt/projectdir/src/main/java/SomeFile.kt: (116, 27): 'setGone(): Unit' is deprecated. Use Android KTX - `.isGone = true`
w: /opt/projectdir/src/main/java/SomeFile.kt: (118, 24): 'setGone(): Unit' is deprecated. Use Android KTX - `.isGone = true`
w: /opt/projectdir/src/main/java/SomeFile.kt: (119, 27): 'setVisible(): Unit' is deprecated. Use Android KTX - `.isVisible = true`
w: /opt/projectdir/src/main/java/SomeFile.kt: (18, 65): Type mismatch: inferred type is ViewGroup? but ViewGroup was expected
w: /opt/projectdir/src/main/java/SomeFile.kt: (4, 41): 'JsonParser' is deprecated. Use Gson
w: /opt/projectdir/src/main/java/SomeFile.kt: (3, 41): 'JsonParser' is deprecated. Use Gson
w: /opt/projectdir/src/main/java/SomeFile.kt: (4, 41): 'JsonParser' is deprecated. Use Gson
w: /opt/projectdir/src/main/java/SomeFile.kt: (13, 87): Elvis operator (?:) always returns the left operand of non-nullable type String
w: /opt/projectdir/src/main/java/SomeFile.kt: (32, 33): 'JsonParser' is deprecated. Use Gson
w: /opt/projectdir/src/main/java/SomeFile.kt: (4, 41): 'JsonParser' is deprecated. Use Gson
w: /opt/projectdir/src/main/java/SomeFile.kt: (3, 41): 'JsonParser' is deprecated. Use Gson
w: /opt/projectdir/src/main/java/SomeFile.kt: (4, 41): 'JsonParser' is deprecated. Use Gson
w: /opt/projectdir/src/main/java/SomeFile.kt: (39, 11): Right operand of elvis operator (?:) is useless if it is null
w: /opt/projectdir/src/main/java/SomeFile.kt: (4, 41): 'JsonParser' is deprecated. Use Gson
w: /opt/projectdir/src/main/java/SomeFile.kt: (5, 41): 'JsonParser' is deprecated. Use Gson
w: /opt/projectdir/src/main/java/SomeFile.kt: (20, 9): Type mismatch: inferred type is String? but String was expected
w: /opt/projectdir/src/main/java/SomeFile.kt: (21, 9): Type mismatch: inferred type is String? but String was expected
w: /opt/projectdir/src/main/java/SomeFile.kt: (17, 9): Type mismatch: inferred type is String? but String was expected
w: /opt/projectdir/src/main/java/SomeFile.kt: (18, 9): Type mismatch: inferred type is String? but String was expected
w: /opt/projectdir/src/main/java/SomeFile.kt: (19, 9): Type mismatch: inferred type is String? but String was expected
w: /opt/projectdir/src/main/java/SomeFile.kt: (21, 9): Type mismatch: inferred type is String? but String was expected
w: /opt/projectdir/src/main/java/SomeFile.kt: (22, 9): Type mismatch: inferred type is String? but String was expected
w: /opt/projectdir/src/main/java/SomeFile.kt: (10, 40): 'OldThing' is deprecated. Use NewThing
w: /opt/projectdir/src/main/java/SomeFile.kt: (172, 27): 'OldThing' is deprecated. Use NewThing
w: /opt/projectdir/src/main/java/SomeFile.kt: (173, 13): 'OldThing' is deprecated. Use NewThing
w: /opt/projectdir/src/main/java/SomeFile.kt: (193, 28): 'OldThing' is deprecated. Use NewThing
w: /opt/projectdir/src/main/java/SomeFile.kt: (194, 13): 'OldThing' is deprecated. Use NewThing
w: /opt/projectdir/src/main/java/SomeFile.kt: (214, 29): 'OldThing' is deprecated. Use NewThing
w: /opt/projectdir/src/main/java/SomeFile.kt: (215, 13): 'OldThing' is deprecated. Use NewThing
w: /opt/projectdir/src/main/java/SomeFile.kt: (389, 32): 'OldThing' is deprecated. Use NewThing
w: /opt/projectdir/src/main/java/SomeFile.kt: (397, 33): 'OldThing' is deprecated. Use NewThing
w: /opt/projectdir/src/main/java/SomeFile.kt: (420, 24): 'OldThing' is deprecated. Use NewThing
w: /opt/projectdir/src/main/java/SomeFile.kt: (468, 41): 'OldThing' is deprecated. Use NewThing
w: /opt/projectdir/src/main/java/SomeFile.kt: (484, 44): 'OldThing' is deprecated. Use NewThing
w: /opt/projectdir/src/main/java/SomeFile.kt: (526, 27): 'OldThing' is deprecated. Use NewThing
w: /opt/projectdir/src/main/java/SomeFile.kt: (533, 28): 'OldThing' is deprecated. Use NewThing
w: /opt/projectdir/src/main/java/SomeFile.kt: (558, 34): 'OldThing' is deprecated. Use NewThing
w: /opt/projectdir/src/main/java/SomeFile.kt: (573, 35): 'OldThing' is deprecated. Use NewThing
w: /opt/projectdir/src/main/java/SomeFile.kt: (598, 38): 'OldThing' is deprecated. Use NewThing
w: /opt/projectdir/src/main/java/SomeFile.kt: (621, 39): 'OldThing' is deprecated. Use NewThing
w: /opt/projectdir/src/main/java/SomeFile.kt: (647, 24): 'OldThing' is deprecated. Use NewThing
w: /opt/projectdir/src/main/java/SomeFile.kt: (648, 13): 'OldThing' is deprecated. Use NewThing
w: /opt/projectdir/src/main/java/SomeFile.kt: (737, 31): 'OldThing' is deprecated. Use NewThing
w: /opt/projectdir/src/main/java/SomeFile.kt: (749, 32): 'OldThing' is deprecated. Use NewThing
w: /opt/projectdir/src/main/java/SomeFile.kt: (315, 36): Unsafe use of a nullable receiver of type Window?
w: /opt/projectdir/src/main/java/SomeFile.kt: (344, 18): Expected performance impact of inlining 'internal final inline fun getStr(option: DebugPrefs.DebugPrefOption): String? defined in com.project.SomeClass.Companion' is insignificant. Inlining works best for functions with parameters of functional types
w: /opt/projectdir/src/main/java/SomeFile.kt: (345, 18): Expected performance impact of inlining 'internal final inline fun getBool(option: DebugPrefs.DebugPrefOption): Boolean defined in com.project.SomeClass.Companion' is insignificant. Inlining works best for functions with parameters of functional types
w: /opt/projectdir/src/main/java/SomeFile.kt: (346, 18): Expected performance impact of inlining 'internal final inline fun setBool(option: DebugPrefs.DebugPrefOption, value: Boolean): Unit defined in com.project.SomeClass.Companion' is insignificant. Inlining works best for functions with parameters of functional types
w: /opt/projectdir/src/main/java/SomeFile.kt: (349, 18): Expected performance impact of inlining 'internal final inline fun setStr(option: DebugPrefs.DebugPrefOption, value: String?): Unit defined in com.project.SomeClass.Companion' is insignificant. Inlining works best for functions with parameters of functional types
w: /opt/projectdir/src/main/java/SomeFile.kt: (825, 29): 'SERIAL: String!' is deprecated. Deprecated in Java
w: /opt/projectdir/src/main/java/SomeFile.kt: (948, 72): Unchecked cast: Array<String?> to Array<String>
w: /opt/projectdir/src/main/java/SomeFile.kt: (1034, 37): 'getResources(): Resources' is deprecated. Use a Context from an active View to ensure the correct resource is loaded.
w: /opt/projectdir/src/main/java/SomeFile.kt: (1037, 17): Unsafe use of a nullable receiver of type Array<String!>?
w: /opt/projectdir/src/main/java/SomeFile.kt: (119, 60): 'OldThing' is deprecated. Use NewThing
w: /opt/projectdir/src/main/java/SomeFile.kt: (122, 45): 'OldThing' is deprecated. Use NewThing
w: /opt/projectdir/src/main/java/SomeFile.kt: (148, 12): 'OldThing' is deprecated. Use NewThing
w: /opt/projectdir/src/main/java/SomeFile.kt: (156, 20): 'OldThing' is deprecated. Use NewThing
w: /opt/projectdir/src/main/java/SomeFile.kt: (36, 37): 'SomeOldThing' is deprecated. Deprecated in Java
w: /opt/projectdir/src/main/java/SomeFile.kt: (68, 52): Type mismatch: inferred type is String? but String was expected
w: /opt/projectdir/src/main/java/SomeFile.kt: (232, 42): Parameter 'tab' is never used
w: /opt/projectdir/src/main/java/SomeFile.kt: (314, 46): Parameter 'page' is never used, could be renamed to _
w: /opt/projectdir/src/main/java/SomeFile.kt: (314, 58): Parameter 'position' is never used, could be renamed to _
w: /opt/projectdir/src/main/java/SomeFile.kt: (145, 17): Parameter 'event' is never used
w: /opt/projectdir/src/main/java/SomeFile.kt: (28, 37): 'SomeOldThing' is deprecated. Deprecated in Java
w: /opt/projectdir/src/main/java/SomeFile.kt: (338, 13): 'SomeOldThing' is deprecated. Deprecated in Java
w: /opt/projectdir/src/main/java/SomeFile.kt: (4, 34): 'Space' is deprecated. Deprecated in Java
w: /opt/projectdir/src/main/java/SomeFile.kt: (93, 51): 'Space' is deprecated. Deprecated in Java
w: /opt/projectdir/src/main/java/SomeFile.kt: (82, 17): Condition 'email != null' is always 'true'
w: /opt/projectdir/src/main/java/SomeFile.kt: (88, 26): Type mismatch: inferred type is Drawable? but Drawable was expected
w: /opt/projectdir/src/main/java/SomeFile.kt: (33, 61): 'getColor(Int): Int' is deprecated. Deprecated in Java
w: /opt/projectdir/src/main/java/SomeFile.kt: (14, 9): Type mismatch: inferred type is String? but String was expected
w: /opt/projectdir/src/main/java/SomeFile.kt: (15, 9): Type mismatch: inferred type is String? but String was expected
w: /opt/projectdir/src/main/java/SomeFile.kt: (16, 9): Type mismatch: inferred type is String? but String was expected
w: /opt/projectdir/src/main/java/SomeFile.kt: (17, 9): Type mismatch: inferred type is String? but String was expected
w: /opt/projectdir/src/main/java/SomeFile.kt: (185, 29): 'Theme_Holo_Light_Dialog: Int' is deprecated. Deprecated in Java
w: /opt/projectdir/src/main/java/SomeFile.kt: (192, 13): Unsafe use of a nullable receiver of type Window?
w: /opt/projectdir/src/main/java/SomeFile.kt: (104, 9): 'trackTapEvent(SpongeEventBuilder): Unit' is deprecated. Deprecated in Java
w: /opt/projectdir/src/main/java/SomeFile.kt: (120, 13): 'trackTapEvent(SpongeEventBuilder): Unit' is deprecated. Deprecated in Java
w: /opt/projectdir/src/main/java/SomeFile.kt: (179, 41): Type mismatch: inferred type is String? but String was expected
w: /opt/projectdir/src/main/java/SomeFile.kt: (51, 42): 'addInitialProps(Intent, Bundle): Unit' is deprecated. Deprecated in Java
w: /opt/projectdir/src/main/java/SomeFile.kt: (6, 40): 'OldThing' is deprecated. Use NewThing
w: /opt/projectdir/src/main/java/SomeFile.kt: (14, 28): 'OldThing' is deprecated. Use NewThing
w: /opt/projectdir/src/main/java/SomeFile.kt: (30, 26): 'OldThing' is deprecated. Use NewThing
w: /opt/projectdir/src/main/java/SomeFile.kt: (52, 69): Type mismatch: inferred type is String? but String was expected
w: /opt/projectdir/src/main/java/SomeFile.kt: (79, 14): Parameter 'data' is never used
w: /opt/projectdir/src/main/java/SomeFile.kt: (6, 24): 'Assert' is deprecated. Deprecated in Java
w: /opt/projectdir/src/main/java/SomeFile.kt: (7, 24): 'Assert' is deprecated. Deprecated in Java
w: /opt/projectdir/src/main/java/SomeFile.kt: (23, 50): Unsafe use of a nullable receiver of type ComponentName?
w: /opt/projectdir/src/main/java/SomeFile.kt: (42, 50): Unsafe use of a nullable receiver of type ComponentName?
w: /opt/projectdir/src/main/java/SomeFile.kt: (58, 50): Unsafe use of a nullable receiver of type ComponentName?
w: /opt/projectdir/src/main/java/SomeFile.kt: (59, 21): 'setAnimationFromJson(String!): Unit' is deprecated. Deprecated in Java
w: /opt/projectdir/src/main/java/SomeFile.kt: (70, 25): 'setGone(): Unit' is deprecated. Use Android KTX - `.isGone = true`
w: /opt/projectdir/src/main/java/SomeFile.kt: (192, 34): Parameter 'data' is never used
w: /opt/projectdir/src/main/java/SomeFile.kt: (23, 35): Type mismatch: inferred type is String? but String was expected
w: /opt/projectdir/src/main/java/SomeFile.kt: (27, 9): Unsafe use of a nullable receiver of type Window?
w: /opt/projectdir/src/main/java/SomeFile.kt: (48, 46): Unsafe use of a nullable receiver of type Window?
w: /opt/projectdir/src/main/java/SomeFile.kt: (51, 9): Unsafe use of a nullable receiver of type Window?
w: /opt/projectdir/src/main/java/SomeFile.kt: (8, 40): 'OldThing' is deprecated. Use NewThing
w: /opt/projectdir/src/main/java/SomeFile.kt: (64, 23): 'OldThing' is deprecated. Use NewThing
w: /opt/projectdir/src/main/java/SomeFile.kt: (64, 59): 'OldThing' is deprecated. Use NewThing
w: /opt/projectdir/src/main/java/SomeFile.kt: (84, 36): 'OldThing' is deprecated. Use NewThing
w: /opt/projectdir/src/main/java/SomeFile.kt: (84, 72): 'OldThing' is deprecated. Use NewThing
w: /opt/projectdir/src/main/java/SomeFile.kt: (3, 41): 'JsonParser' is deprecated. Use Gson
w: /opt/projectdir/src/main/java/SomeFile.kt: (4, 41): 'JsonParser' is deprecated. Use Gson
w: /opt/projectdir/src/main/java/SomeFile.kt: (13, 9): 'JsonParser' is deprecated. Use Gson
w: /opt/projectdir/src/main/java/SomeFile.kt: (15, 9): 'JsonParser' is deprecated. Use Gson
w: /opt/projectdir/src/main/java/SomeFile.kt: (62, 45): Variable 'defaultValue' initializer is redundant
w: /opt/projectdir/src/main/java/SomeFile.kt: (106, 35): 'submitButton(): SomeOldThing?' is deprecated. Deprecated in Java
w: /opt/projectdir/src/main/java/SomeFile.kt: (114, 13): 'pageViewTracking(): OtherOldThing?' is deprecated. Deprecated in Java
w: /opt/projectdir/src/main/java/SomeFile.kt: (193, 63): 'submitButton(): SomeOldThing?' is deprecated. Deprecated in Java
w: /opt/projectdir/src/main/java/SomeFile.kt: (217, 57): 'getColor(Int): Int' is deprecated. Deprecated in Java
w: /opt/projectdir/src/main/java/SomeFile.kt: (99, 35): 'getColor(Int): Int' is deprecated. Deprecated in Java
w: /opt/projectdir/src/main/java/SomeFile.kt: (4, 38): 'OldEventBuilder' is deprecated. Deprecated in Java
w: /opt/projectdir/src/main/java/SomeFile.kt: (65, 33): 'getResources(): Resources' is deprecated. Use a Context from an active View to ensure the correct resource is loaded.
w: /opt/projectdir/src/main/java/SomeFile.kt: (7, 46): 'OldClass' is deprecated. Deprecated in Java
w: /opt/projectdir/src/main/java/SomeFile.kt: (10, 56): 'OldClass' is deprecated. Deprecated in Java
w: /opt/projectdir/src/main/java/SomeFile.kt: (10, 54): 'AdapterDelegate<DataT : Any!, ViewHolderT : CustomViewHolder!>' is deprecated. Deprecated in Java
w: /opt/projectdir/src/main/java/SomeFile.kt: (21, 56): 'AdapterDelegate<DataT : Any!, ViewHolderT : CustomViewHolder!>' is deprecated. Deprecated in Java
w: /opt/projectdir/src/main/java/SomeFile.kt: (111, 31): 'setGone(): Unit' is deprecated. Use Android KTX - `.isGone = true`
w: /opt/projectdir/src/main/java/SomeFile.kt: (136, 34): 'setGone(): Unit' is deprecated. Use Android KTX - `.isGone = true`
w: /opt/projectdir/src/main/java/SomeFile.kt: (98, 70): Type mismatch: inferred type is Drawable? but Drawable was expected
w: /opt/projectdir/src/main/java/SomeFile.kt: (19, 37): 'SomeOldThing' is deprecated. Deprecated in Java
w: /opt/projectdir/src/main/java/SomeFile.kt: (43, 52): 'SomeOldThing' is deprecated. Deprecated in Java
w: /opt/projectdir/src/main/java/SomeFile.kt: (136, 23): 'setGone(): Unit' is deprecated. Use Android KTX - `.isGone = true`
w: /opt/projectdir/src/main/java/SomeFile.kt: (139, 17): 'setVisible(): Unit' is deprecated. Use Android KTX - `.isVisible = true`
w: /opt/projectdir/src/main/java/SomeFile.kt: (264, 21): 'setVisible(): Unit' is deprecated. Use Android KTX - `.isVisible = true`
w: /opt/projectdir/src/main/java/SomeFile.kt: (265, 19): 'setGone(): Unit' is deprecated. Use Android KTX - `.isGone = true`
w: /opt/projectdir/src/main/java/SomeFile.kt: (266, 23): 'setGone(): Unit' is deprecated. Use Android KTX - `.isGone = true`
w: /opt/projectdir/src/main/java/SomeFile.kt: (267, 19): 'setGone(): Unit' is deprecated. Use Android KTX - `.isGone = true`
w: /opt/projectdir/src/main/java/SomeFile.kt: (271, 19): 'setVisible(): Unit' is deprecated. Use Android KTX - `.isVisible = true`
w: /opt/projectdir/src/main/java/SomeFile.kt: (272, 21): 'setGone(): Unit' is deprecated. Use Android KTX - `.isGone = true`
w: /opt/projectdir/src/main/java/SomeFile.kt: (273, 23): 'setGone(): Unit' is deprecated. Use Android KTX - `.isGone = true`
w: /opt/projectdir/src/main/java/SomeFile.kt: (274, 19): 'setGone(): Unit' is deprecated. Use Android KTX - `.isGone = true`
w: /opt/projectdir/src/main/java/SomeFile.kt: (278, 23): 'setVisible(): Unit' is deprecated. Use Android KTX - `.isVisible = true`
w: /opt/projectdir/src/main/java/SomeFile.kt: (279, 19): 'setVisible(): Unit' is deprecated. Use Android KTX - `.isVisible = true`
w: /opt/projectdir/src/main/java/SomeFile.kt: (280, 21): 'setGone(): Unit' is deprecated. Use Android KTX - `.isGone = true`
w: /opt/projectdir/src/main/java/SomeFile.kt: (281, 19): 'setGone(): Unit' is deprecated. Use Android KTX - `.isGone = true`
w: /opt/projectdir/src/main/java/SomeFile.kt: (22, 37): 'SomeOldThing' is deprecated. Deprecated in Java
w: /opt/projectdir/src/main/java/SomeFile.kt: (140, 9): 'SomeOldThing' is deprecated. Deprecated in Java
w: /opt/projectdir/src/main/java/SomeFile.kt: (154, 9): 'SomeOldThing' is deprecated. Deprecated in Java
w: /opt/projectdir/src/main/java/SomeFile.kt: (53, 71): Type mismatch: inferred type is Drawable? but Drawable was expected
w: /opt/projectdir/src/main/java/SomeFile.kt: (10, 40): 'OldThing' is deprecated. Use NewThing
w: /opt/projectdir/src/main/java/SomeFile.kt: (30, 23): 'OldThing' is deprecated. Use NewThing
w: /opt/projectdir/src/main/java/SomeFile.kt: (38, 24): 'OldThing' is deprecated. Use NewThing
w: /opt/projectdir/src/main/java/SomeFile.kt: (57, 39): 'OldThing' is deprecated. Use NewThing
w: /opt/projectdir/src/main/java/SomeFile.kt: (64, 40): 'OldThing' is deprecated. Use NewThing
w: /opt/projectdir/src/main/java/SomeFile.kt: (278, 17): Parameter 'event' is never used
w: /opt/projectdir/src/main/java/SomeFile.kt: (33, 37): 'SomeOldThing' is deprecated. Deprecated in Java
w: /opt/projectdir/src/main/java/SomeFile.kt: (68, 9): 'SomeOldThing' is deprecated. Deprecated in Java
w: /opt/projectdir/src/main/java/SomeFile.kt: (73, 9): 'SomeOldThing' is deprecated. Deprecated in Java
w: /opt/projectdir/src/main/java/SomeFile.kt: (102, 17): Parameter 'event' is never used
w: /opt/projectdir/src/main/java/SomeFile.kt: (15, 37): 'SomeOldThing' is deprecated. Deprecated in Java
w: /opt/projectdir/src/main/java/SomeFile.kt: (27, 9): 'SomeOldThing' is deprecated. Deprecated in Java
w: /opt/projectdir/src/main/java/SomeFile.kt: (10, 37): 'SomeOldThing' is deprecated. Deprecated in Java
w: /opt/projectdir/src/main/java/SomeFile.kt: (36, 9): 'SomeOldThing' is deprecated. Deprecated in Java
w: /opt/projectdir/src/main/java/SomeFile.kt: (43, 9): 'SomeOldThing' is deprecated. Deprecated in Java
w: /opt/projectdir/src/main/java/SomeFile.kt: (92, 58): 'getDrawable(Int): Drawable!' is deprecated. Deprecated in Java
w: /opt/projectdir/src/main/java/SomeFile.kt: (94, 79): 'getDrawable(Int): Drawable!' is deprecated. Deprecated in Java
w: /opt/projectdir/src/main/java/SomeFile.kt: (14, 74): 'getDrawable(Int): Drawable!' is deprecated. Deprecated in Java
w: /opt/projectdir/src/main/java/SomeFile.kt: (17, 50): 'getDrawable(Int): Drawable!' is deprecated. Deprecated in Java
w: /opt/projectdir/src/main/java/SomeFile.kt: (25, 68): 'getDrawable(Int): Drawable!' is deprecated. Deprecated in Java
w: /opt/projectdir/src/main/java/SomeFile.kt: (30, 70): 'getColor(Int): Int' is deprecated. Deprecated in Java
Basically, every match that's valid in my case starts with "w: ", so I'm not sure if you saw others, but I'm hoping these cases might be useful.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.