rrd108 / vue-mess-detector

A static code analysis tool for detecting code smells and best practice violations in Vue.js and Nuxt.js projects
MIT License
242 stars 9 forks source link

Feature/ignore rules for file #450

Closed ryan-williams-nourish closed 2 days ago

ryan-williams-nourish commented 2 weeks ago

Summary

I have created a new capability to ignore specific rules for specific files (or indeed file matchers) by adding the following to the vue-mess-detector.json:

"fileIgnoreRules": {
    "src/main.ts": "tooManyProps,computedSideEffects",
    "src/router/index.ts": "noConsole,multiAttributeElements"
  }

Description

  1. I added a fileIgnoreRules to your config object, an array of string:string records.
  2. I added the field to the analyse method and updated output to let the user know what files we're ignoring rules for
  3. I updated checkFile to update the apply value to remove rules listed in matching files, with that capability pushed out to a checkFileIgnoreRules method.

Related Issues

N/A

Type of Change

Screenshots (if applicable)

N/A

github-actions[bot] commented 2 weeks ago

logo Vue Mess Detector Analysis Results

PR Code Health Full Code Health

🚨 New Errors: 3 ⚠️ New Warnings: 4 ✅ Fixed Errors: 0 🔧 Fixed Warnings: 0 📝 Total Lines: 227 📁 Total Files: 2

New Issues ``` - src/rules/rrd/repeatedCss.ts: rrd ~ else conditions: else clauses found (1) 🚨 rrd ~ function size: function (checkRepeatedCss#14) is too long: 32 lines 🚨 rrd ~ magic numbers: magic numbers found (line #53 magic number: 3) 🚨 - src/rules/rrd/repeatedCss.test.ts: rrd ~ Long Githubissues.
  • Githubissues is a development platform for aggregating issues.