eecs280staff / tutorials

Tools and tutorials
https://eecs280staff.github.io/tutorials/
Other
5 stars 4 forks source link

PMD/CPD --failOnViolation deprecated #21

Open jamesjuett opened 2 years ago

jamesjuett commented 2 years ago

We use cpd, one of the pmd tools, for style checking. Current usage gives this warning:

Jun 29, 2022 10:38:46 AM net.sourceforge.pmd.cpd.CPDCommandLineInterface parseArgs
WARNING: Some deprecated options were used on the command-line, including --failOnViolation
Jun 29, 2022 10:38:46 AM net.sourceforge.pmd.cpd.CPDCommandLineInterface parseArgs
WARNING: Consider replacing it with --fail-on-violation

We should replace with --fail-on-violation as suggested.

jamesjuett commented 2 years ago

I realized that we might actually depend on an older version of pmd on the AG or on CAEN, in which case it's possible --failOnViolation may be the right option (and --fail-on-violation might not exist yet).

jamesjuett commented 1 month ago

We should consider asking CAEN to update the version of pmd on CAEN. When that happens, we can update the AG docker image as well and switch to --fail-on-volation. (The current version on CAEN, 6.0.1, only supports the deprecated --failOnViolation.)

awdeorio commented 1 month ago

This seems reasonable. FWIW, the latest stable version distributed on Homebrew for macOS is 7.4. Note the fun ASCII art.

$ pmd --version
  ████                            ████
  ██                                ██
  ██  █████ █ ███    ███  ███████   ██
 ███  ██  ███ ████  ████  ██    ██  ███
 ███  ███████ ██ ████ ██  ██    ██  ███
  ██  ██      ██  ██  ██  ███████   ██
  ██                                ██
  ████                            ████
PMD 7.4.0 (db5fa2dbce210ed50936c65d0e2bf52de4ec0e35, 2024-07-26T06:43:17Z)
Java version: 22.0.2, vendor: Homebrew, runtime: /opt/homebrew/Cellar/openjdk/22.0.2/libexec/openjdk.jdk/Contents/Home

EDIT: cpd is a subcommand of pmd in the macOS distribution.