
Research
Malicious npm Packages Impersonate Flashbots SDKs, Targeting Ethereum Wallet Credentials
Four npm packages disguised as cryptographic tools steal developer credentials and send them to attacker-controlled Telegram infrastructure.
cr2checkstyle
Advanced tools
Convert complexity-report data to Checkstyle XML
This purpose of this command line tool is to convert the JSON output of complexity-report to Checkstyle-compatible XML.
cr2checkstyle reads from stdin
and writes to stdout
:
$ cr --format json --output report.json .
$ cr2checkstyle < report.json > report.xml
Or simply use piping:
$ cr --format json . | cr2checkstyle > report.xml
cr2checkstyle always terminates with an exit code of 0 (unless an internal error occurred), even if the generated checkstyle report contains items with severity "error". To change this behaviour use the --exit-code
option.
By default, cr2checkstyle has no thresholds set so it will not generate any warnings or errors. Currently supported metrics are cyclomatic complexity, halstead difficulty and the maintainability index. The corresponding command line options are:
module-maintainability
module-cyclomatic-complexity
function-cyclomatic-complexity
module-halstead-difficulty
function-halstead-difficulty
Thresholds are given as a low and high watermark. Values above the high watermark will cause errors, values between the low and high watermark will cause warnings (likewise for higher-is-better metrics such as the maintainability index):
# Check module-level maintainability index:
# 0-80 is an error, 80 to 90 is a warning, above 90 is ok
$ cr2checkstyle --module-maintainability 80,90
# Check function-level cyclomatic complexity:
# 0-2 is ok, 2-4 is a warning, above 4 is an error
$ cr2checkstyle --function-cyclomatic-complexity 2,4
Internally, parameters are parsed with yargs so you can also use environment variables (e.g., CR2CS_FUNCTION_HALSTEAD_DIFFICULTY=3,6
) and the cr2checkstyle
-property in your package.json
.
FAQs
Convert complexity-report data to Checkstyle XML
The npm package cr2checkstyle receives a total of 0 weekly downloads. As such, cr2checkstyle popularity was classified as not popular.
We found that cr2checkstyle demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Four npm packages disguised as cryptographic tools steal developer credentials and send them to attacker-controlled Telegram infrastructure.
Security News
Ruby maintainers from Bundler and rbenv teams are building rv to bring Python uv's speed and unified tooling approach to Ruby development.
Security News
Following last week’s supply chain attack, Nx published findings on the GitHub Actions exploit and moved npm publishing to Trusted Publishers.