apigee / apigeelint

Static code analysis for Apigee proxy bundles to encourage API developers to use best practices and avoid anti-patterns.
Apache License 2.0
92 stars 71 forks source link

--list flag ignores external plugins #309

Closed gmornet closed 2 years ago

gmornet commented 2 years ago

According to the documentation, the --list flag does: "do not execute, instead list the available plugins and formatters".

However, it only lists internal plugins, even when adding the -x flag.

I would expect either: 1) the documentation to state that --list "lists the available plugins" 2) or better, list both internal and external plugins

Steps to reproduce

➜  git clone https://github.com/apigee/apigeelint.git
➜  cd apigeelint 
➜  npm install

➜  node ./cli.js --list
available plugins: BN001, BN003, BN004, BN005, BN006, BN007, BN009, BN010, CC001, CC003, CC004, CC005, CC006, DC001, DC002, EP001, FL001, FR001, FR002, PD001, PD002, PD003, PD004, PD005, PO001, PO002, PO003, PO004, PO005, PO006, PO007, PO008, PO012, PO013, PO018, PO019, PO020, PO022, PO023, PO024, PO025, PO026, PO027, PO028, PO029, PO030, PO031, ST001, ST002, TD001, TD002, TD003, TD004, TD005

➜  node ./cli.js -x externalPlugins --list 
available plugins: BN001, BN003, BN004, BN005, BN006, BN007, BN009, BN010, CC001, CC003, CC004, CC005, CC006, DC001, DC002, EP001, FL001, FR001, FR002, PD001, PD002, PD003, PD004, PD005, PO001, PO002, PO003, PO004, PO005, PO006, PO007, PO008, PO012, PO013, PO018, PO019, PO020, PO022, PO023, PO024, PO025, PO026, PO027, PO028, PO029, PO030, PO031, ST001, ST002, TD001, TD002, TD003, TD004, TD005
ssvaidyanathan commented 2 years ago

Fixed and released in v2.21.2