Giter VIP home page Giter VIP logo

cerberus's People

Contributors

aravind666 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

cerberus's Issues

Allow markdown export of metrics report

Currently Code metrics diff hound, provides report in PSV and CSV format. So we need to add Markdown and HTML format of reports so that metrics could be consumed easily by various projects

Cerberus not catching pragmas and suppressions with white spaces

I found that some intelligent developers are putting suppressions especially with C and C++ as

Screenshot 2020-11-13 at 7 02 52 PM

This cannot be caught be Cerberus because cerberus just assumes that suppression does not start with white space, Offcourse that is true with java it throws a compilation error. But with C and C++ it does not matter so we need to handle this.

Usability issue - class/method names too long!

Reported by one of the teams using JCMD-DIFF, the output generates a column called "CLASS", content of the class is more often than not, too long to read! This creates a distortion, where the necessary values (before/after/metrics) are pushed to the extreme right, and we are unable to easily view the output.

Since the filename is sufficient, i think skipping class would help in improving readability of the generated output!

Modes of operation with Cerberus

Consider different modes of operations for Cerberus:

  1. Report mode: This can be used for evidence collection, where Cerberus just reports out the identified violations.
  2. Benchmark mode: Set the thresholds of violation count to the current violation counts, this way if we'd want to run Cerberus on legacy code, we can set the thresholds based on the current state, and not allow an increase in incremental or absolute violations.
  3. Suggestion mode: Where Cerberus not only identifies the violations but also suggests (context-sensitive) how to fix those violations as well.
  4. Enforce mode: Where Cerberus automatically makes the suggested changes and reports back what violation was corrected how!

User can choose the mode of operation of Cerberus via configurations!

Usability issue: Sort the report by highest unit in diff

Right now, the output of JCMD-DIFF doesn't sort any value. The request here is to sort the values by the highest difference in the oldValue and the newValue. Also, group by the same class-name.

This will ensure that the leads/reviewers are always looking at the highest difference from the same class, and take quick decisions.

Hard crash when invalid language is specified

Example below (language=cs). Ideal would be to give message that language name is not supported and give a list of valid language names to the user at command line instead of hard crash-out with raw exception. Also, do you want language name to be case sensitive?

$ java -jar cerberus-executable.jar SWD --language=cs --files=.
java.lang.IllegalArgumentException: No enum constant com.philips.swcoe.cerberus.cerebellum.swd.SuppressedWarningDetectors.cs
at java.base/java.lang.Enum.valueOf(Enum.java:240)
at com.philips.swcoe.cerberus.cerebellum.swd.SuppressedWarningDetectors.valueOf(SuppressedWarningDetectors.java:11)
at com.philips.swcoe.cerberus.hounds.SuppressedWarnings.call(SuppressedWarnings.java:50)
at com.philips.swcoe.cerberus.hounds.SuppressedWarnings.call(SuppressedWarnings.java:30)
at picocli.CommandLine.executeUserObject(CommandLine.java:1783)
at picocli.CommandLine.access$900(CommandLine.java:145)
at picocli.CommandLine$RunLast.handle(CommandLine.java:2141)
at picocli.CommandLine$RunLast.handle(CommandLine.java:2108)
at picocli.CommandLine$AbstractParseResultHandler.execute(CommandLine.java:1975)
at picocli.CommandLine.execute(CommandLine.java:1904)
at com.philips.swcoe.cerberus.Cerberus.main(Cerberus.java:40)

NFR gating for Cerberus

NFRs have to be defined for Cerberus, and gated with every commit.

@simaos, @aravind666 - can you please add to NFRs that we'd want to automatically gate?

Sample NFR:

  • Relative & absolute thresholds of execution time for all functionality provided by Cerberus

Incremental and absolute gating via Cerberus

For all the hounds, currently Cerberus only reports violations. Can we consider adding gating on the violations reported so that the # of violations can be configured & we can report a "pass" or a "fail" based on breach of threshold.

Also to consider - relative gating, ie. if the previous violation count was x, and the threshold is set to x+5, if the subsequent violation count goes to x+3, we should have consider failing the build for this increase in threshold. If the threshold decreases, then automatically set the acceptable threshold to the lower value.

SWD requires language to be specified in caps!

SWD works only if the language is specified in caps. Ideally it should work with any combination of capital/lower-case letters. May be worth adding equals.ignoreCase() when comparing the language input.

Checkstyle violations check via Cerberus

With many teams implementing legacy build systems which may not support checkstyle violations, can we include a hound to do checkstyle check based on:

  1. Either a default configuration per programming language if none-is-specified
  2. Run checkstyle against a custom configuration provided via a command-line argument

PMD with java version?

Why do we have "java-version"? and language option?

Eg: If i specify language as cpp, what does "java-version" for cpp mean?

Publish to Dockerhub

Project already includes a Dockerfile so it should be published to Dockerhub as part of the action build.

Cerberus4Cerberus

Cerberus scans and gates itself. There is value here in both testing, feedback on real use cases and role modelling that we trust this tool enough, and beleive in its value enough, to scan itself.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.