Is there a way to make use of apigeeLint npm module to pass custom rules instead of existing ones.

Is there a way to make use of apigeelint files to pass in custom rule set objects instead of default ones. I want to achieve this without forking the module?

also Is it possible pass custom rules plugin to existing executePlugin function within apigeelint module without forking or is there an option to override executePlugin function?

0 4 249
4 REPLIES 4

I believe you want bundleLinter.js to look for plugins in a different directory than the plugins? That's not supported right now. Pls raise a PR for the same but as of now once you write your own rule you can place them under the /node_modules/apigeelint/lib/package/plugins/ directory and all of them are executed automatically.

You can write your own plugin/rule as elaborated here https://community.apigee.com/articles/80012/how-to-develop-new-plugins-for-apigeelint.html

If existing rules needs changes? for eg under policyNamingConvention.js, I do not want those naming convention rules to be executed instead I want some modifications to those rules

For Eg: The policy abbreviation should be KV instead of kv and output should be based on the modifications. Can I achieve that without changing the policyNamingConvention.js within the actual apigeelinter module?

Hi @Venkat Veldurthy,

A new version of Apigeelint (0.4.3) was just published with an "--externalPluginsDirectory" option to allow any number of additional plugins to be executed. It does not however, preclude the use of the existing plugins, those would still execute.

You can use the "--excluded" option to exclude a list of tests (e.g. --excluded PO007), then add your own plugin for your naming conventions. I've added an external plugin to the repo demonstrating alternate naming conventions.

node ./cli.js -x ./externalPlugins -e PO007 -f table.js -s test/fixtures/resources/sampleProxy/24Solver/apiproxy

Output will include EX-PO007 rule ID.

Perfect thanks @Kurt Googler Kanaskie, let me check.