nikialeksey / nullfree Goto Github PK
View Code? Open in Web Editor NEWNullfree will fail your build if your project has a null.
Home Page: https://www.iwillfailyou.com/nullfree
License: MIT License
Nullfree will fail your build if your project has a null.
Home Page: https://www.iwillfailyou.com/nullfree
License: MIT License
The puzzle 10-f22f4273
from #10 has to be resolved:
nullfree/plugin-gradle/build.gradle
Line 29 in 9e27419
The puzzle was created by @nikialeksey on 07-May-19.
If you have any technical questions, don't ask me, submit new tickets instead. The task will be "done" when the problem is fixed and the text of the puzzle is removed from the source code. Here is more about PDD and about me.
The puzzle 3-10643be9
from #3 has to be resolved:
Line 29 in e4bf6b2
The puzzle was created by @nikialeksey on 29-Apr-19.
If you have any technical questions, don't ask me, submit new tickets instead. The task will be "done" when the problem is fixed and the text of the puzzle is removed from the source code. Here is more about PDD and about me.
The puzzle 2-b8bf8dcb
from #2 has to be resolved:
nullfree/plugin-maven/build.gradle
Line 10 in 4118df4
The puzzle was created by @nikialeksey on 09-May-19.
If you have any technical questions, don't ask me, submit new tickets instead. The task will be "done" when the problem is fixed and the text of the puzzle is removed from the source code. Here is more about PDD and about me.
Nice tool!
I have a problem with defining my git repository with ssh. Plugin fails if git remote is set via ssh:
[INFO] --- nullfree-maven-plugin:1.4.2:nullfree (default-cli) @ tasks-thing ---
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 0.699 s
[INFO] Finished at: 2020-02-17T21:50:14+03:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal com.nikialeksey:nullfree-maven-plugin:1.4.2:nullfree (default-cli) on project tasks-thing: Can not get the origin from git repo.: Can not form the origin url. no protocol: [email protected]:v1690117/tasks-thing.git -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
If I set remote using http everything is fine.
Thanks!
The puzzle 10-7d5def67
from #10 has to be resolved:
nullfree/plugin-maven/build.gradle
Line 10 in 9e27419
The puzzle was created by @nikialeksey on 07-May-19.
If you have any technical questions, don't ask me, submit new tickets instead. The task will be "done" when the problem is fixed and the text of the puzzle is removed from the source code. Here is more about PDD and about me.
> Task :nullfree FAILED
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':nullfree'.
> (line 4,col 10) Parse error. Found "execute" <IDENTIFIER>, expected "("
Problem stacktrace :
com.github.javaparser.GeneratedJavaParser.generateParseException(GeneratedJavaParser.java:10567)
com.github.javaparser.GeneratedJavaParser.jj_consume_token(GeneratedJavaParser.java:10426)
com.github.javaparser.GeneratedJavaParser.Parameters(GeneratedJavaParser.java:1286)
com.github.javaparser.GeneratedJavaParser.MethodDeclaration(GeneratedJavaParser.java:1209)
com.github.javaparser.GeneratedJavaParser.ClassOrInterfaceBodyDeclaration(GeneratedJavaParser.java:952)
com.github.javaparser.GeneratedJavaParser.ClassOrInterfaceBody(GeneratedJavaParser.java:846)
com.github.javaparser.GeneratedJavaParser.ClassOrInterfaceDeclaration(GeneratedJavaParser.java:408)
com.github.javaparser.GeneratedJavaParser.CompilationUnit(GeneratedJavaParser.java:154)
com.github.javaparser.JavaParser.parse(JavaParser.java:115)
com.github.javaparser.JavaParser.parse(JavaParser.java:147)
com.github.javaparser.JavaParser.parse(JavaParser.java:159)
com.github.javaparser.StaticJavaParser.parse(StaticJavaParser.java:98)
com.nikialeksey.nullfree.sources.java.JavaSourceFile.nulls(JavaSourceFile.java:63)
com.nikialeksey.nullfree.sources.SimpleSources.nulls(SimpleSources.java:66)
com.nikialeksey.nullfree.SimpleNullfree.badge(SimpleNullfree.java:23)
com.nikialeksey.nullfree.NullfreePlugin.lambda$apply$1(NullfreePlugin.java:51)
org.gradle.api.internal.AbstractTask$TaskActionWrapper.execute(AbstractTask.java:801)
org.gradle.api.internal.AbstractTask$TaskActionWrapper.execute(AbstractTask.java:768)
org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter$1.run(ExecuteActionsTaskExecuter.java:131)
org.gradle.internal.operations.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:300)
org.gradle.internal.operations.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:292)
org.gradle.internal.operations.DefaultBuildOperationExecutor.execute(DefaultBuildOperationExecutor.java:174)
org.gradle.internal.operations.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:90)
org.gradle.internal.operations.DelegatingBuildOperationExecutor.run(DelegatingBuildOperationExecutor.java:31)
org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeAction(ExecuteActionsTaskExecuter.java:120)
org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeActions(ExecuteActionsTaskExecuter.java:99)
org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.execute(ExecuteActionsTaskExecuter.java:77)
org.gradle.api.internal.tasks.execution.OutputDirectoryCreatingTaskExecuter.execute(OutputDirectoryCreatingTaskExecuter.java:51)
org.gradle.api.internal.tasks.execution.SkipUpToDateTaskExecuter.execute(SkipUpToDateTaskExecuter.java:59)
org.gradle.api.internal.tasks.execution.ResolveTaskOutputCachingStateExecuter.execute(ResolveTaskOutputCachingStateExecuter.java:54)
org.gradle.api.internal.tasks.execution.ValidatingTaskExecuter.execute(ValidatingTaskExecuter.java:59)
org.gradle.api.internal.tasks.execution.SkipEmptySourceFilesTaskExecuter.execute(SkipEmptySourceFilesTaskExecuter.java:101)
org.gradle.api.internal.tasks.execution.FinalizeInputFilePropertiesTaskExecuter.execute(FinalizeInputFilePropertiesTaskExecuter.java:44)
org.gradle.api.internal.tasks.execution.CleanupStaleOutputsExecuter.execute(CleanupStaleOutputsExecuter.java:91)
org.gradle.api.internal.tasks.execution.ResolveTaskArtifactStateTaskExecuter.execute(ResolveTaskArtifactStateTaskExecuter.java:62)
org.gradle.api.internal.tasks.execution.SkipTaskWithNoActionsExecuter.execute(SkipTaskWithNoActionsExecuter.java:59)
org.gradle.api.internal.tasks.execution.SkipOnlyIfTaskExecuter.execute(SkipOnlyIfTaskExecuter.java:54)
org.gradle.api.internal.tasks.execution.ExecuteAtMostOnceTaskExecuter.execute(ExecuteAtMostOnceTaskExecuter.java:43)
org.gradle.api.internal.tasks.execution.CatchExceptionTaskExecuter.execute(CatchExceptionTaskExecuter.java:34)
org.gradle.api.internal.tasks.execution.EventFiringTaskExecuter$1.run(EventFiringTaskExecuter.java:51)
org.gradle.internal.operations.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:300)
org.gradle.internal.operations.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:292)
org.gradle.internal.operations.DefaultBuildOperationExecutor.execute(DefaultBuildOperationExecutor.java:174)
org.gradle.internal.operations.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:90)
org.gradle.internal.operations.DelegatingBuildOperationExecutor.run(DelegatingBuildOperationExecutor.java:31)
org.gradle.api.internal.tasks.execution.EventFiringTaskExecuter.execute(EventFiringTaskExecuter.java:46)
org.gradle.execution.taskgraph.LocalTaskInfoExecutor.execute(LocalTaskInfoExecutor.java:42)
org.gradle.execution.taskgraph.DefaultTaskExecutionGraph$BuildOperationAwareWorkItemExecutor.execute(DefaultTaskExecutionGraph.java:277)
org.gradle.execution.taskgraph.DefaultTaskExecutionGraph$BuildOperationAwareWorkItemExecutor.execute(DefaultTaskExecutionGraph.java:262)
org.gradle.execution.taskgraph.DefaultTaskPlanExecutor$ExecutorWorker$1.execute(DefaultTaskPlanExecutor.java:135)
org.gradle.execution.taskgraph.DefaultTaskPlanExecutor$ExecutorWorker$1.execute(DefaultTaskPlanExecutor.java:130)
org.gradle.execution.taskgraph.DefaultTaskPlanExecutor$ExecutorWorker.execute(DefaultTaskPlanExecutor.java:200)
org.gradle.execution.taskgraph.DefaultTaskPlanExecutor$ExecutorWorker.executeWithWork(DefaultTaskPlanExecutor.java:191)
org.gradle.execution.taskgraph.DefaultTaskPlanExecutor$ExecutorWorker.run(DefaultTaskPlanExecutor.java:130)
org.gradle.internal.concurrent.ExecutorPolicy$CatchAndRecordFailures.onExecute(ExecutorPolicy.java:63)
org.gradle.internal.concurrent.ManagedExecutorImpl$1.run(ManagedExecutorImpl.java:46)
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
org.gradle.internal.concurrent.ThreadFactoryImpl$ManagedThreadRunnable.run(ThreadFactoryImpl.java:55)
java.lang.Thread.run(Thread.java:748)
This stacktrace should show the problem file path.
The puzzle 2-b018f692
from #2 has to be resolved:
nullfree/plugin-gradle/build.gradle
Line 29 in 4118df4
The puzzle was created by @nikialeksey on 09-May-19.
If you have any technical questions, don't ask me, submit new tickets instead. The task will be "done" when the problem is fixed and the text of the puzzle is removed from the source code. Here is more about PDD and about me.
Seems, that comparision with null does not do anything harm. So we can add that ability in plugin configs
Based on approach taken in
I think the famous NPE is happening 10% because of explicit return null; / x = null;
in various flavours,
but 90% due something like HashMap.get("non-existing-key")
or getters for non-initialised object fields with defaults, e.g. name
in https://www.codebyamir.com/blog/stop-returning-null-in-java
Besides, in the second case, it makes sense to skip/allow != null
pattern as comparison doesn't do any harm + it's often unavoidable for an imported library classes you don't control
Need read me for the details of project
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.