Issues using Picocli as source file directly in project
See original GitHub issueI tried to copy Picocli directly in my project (for testing of a modification) but I had to include more than the CommandLine.java file :
- The CommandLine makes references to AutoComplete in comments like
{@link AutoComplete}
which produces errors on my IDE and CI. - Picocli breaks rules on my Gradle build checks like the use of raw types
[rawtypes] found raw type
or redundant casts[cast] redundant cast to T
and warnings are treated as errors in our checks… - I have a strange
error: cannot find symbol
? Range.valueOf("" + ((MethodParam) member.accessible).position)
^
symbol: class MethodParam
location: class Range
- My coding conventions are set to Google code style, and it reformats the code of the Picocli in a way that I can’t even think of merging my modifications back to Picocli original project.
- we have to create a picocli package or change packages in CommandLine file -> changing all imports.
So I did my modifications in the Picocli project (my clone) and built the JAR to include in my other project. I then asked myself, why as Picocli is intended to be used directly as a single source file ? What have I missed ? Thanks.
Issue Analytics
- State:
- Created 5 years ago
- Comments:6 (6 by maintainers)
Top Results From Across the Web
picocli - a mighty tiny command line interface
To include as source, get the source code from the GitHub file. Copy and paste it into a file called CommandLine.java , add...
Read more >Quick Guide - Picocli
Picocli is a one-file framework for creating Java command line ... The content below shows the source code of the ASCIIArt example, ...
Read more >a mighty tiny command line interface - picocli
Picocli is a one-file Java framework for parsing command line arguments and generating polished, easily tailored usage help messages. With ...
Read more >a mighty tiny command line interface - picocli
Picocli is a one-file framework for creating Java command line applications with almost zero code. Supports a variety of command line syntax ...
Read more >a mighty tiny command line interface - picocli
Picocli is a one-file framework for creating Java command line ... file, to encourage application authors to include it in source form.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
I believe I also fixed this error you reported. MethodParam is now a package protected inner class of Model instead of a private inner class of Model.
I removed the {@link AutoComplete} from the javadoc, and fixed compile warnings “use of raw types [rawtypes] found” and “[cast] redundant cast to T” in master.