joshiayush / argparse Goto Github PK
View Code? Open in Web Editor NEWA light-weight argument parsing library with no external dependency.
License: BSD 3-Clause "New" or "Revised" License
A light-weight argument parsing library with no external dependency.
License: BSD 3-Clause "New" or "Revised" License
argparse/src/main/java/Argparse/OsUtils.java
Lines 92 to 97 in a99c1d1
I think adding support for Solaris is a bit out-of-scope for me as a developer right now, because I don't have experience using Solaris. I can add support for Mac although that's another operating system that I didn't use but it's a bit similar to Linux which is my primary operating system. And because of the platform independence of Java
project argparse
will have no issue on Windows. But adding support for Solaris is a bit weird right now. Either remove the function completely or add support for Solaris too.
argparse/src/main/java/Argparse/Argparse.java
Line 273 in e2bdee4
Instead of checking if isGroupArgumentEncountered
is true
or not what we can check is if the variable groupArgument
is null
or not. If the groupArgument
variable is null
we will set it to the current group argument otherwise we will raise error as we already have a group argument present.
argparse/src/main/java/Argparse/Argparse.java
Lines 302 to 309 in e2bdee4
argparse/src/main/java/Argparse/Argparse.java
Lines 334 to 341 in e2bdee4
As you can see the above conditional check is repeating itself at line 302
and at line 334
which can easily be refactored into a single function call.
argparse/src/main/java/Argparse/Argparse.java
Lines 312 to 320 in e2bdee4
argparse/src/main/java/Argparse/Argparse.java
Lines 348 to 356 in e2bdee4
As you can see the above conditional check is also repeating itself at line 312
and at line 348
which can easily be refactored into a single function call.
We need to refactor these into separate function calls because as the complexity of our program will increase it will become harder to maintain the program and modify it.
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.