But what do you do when you have files, or "categories" of files, that you'd prefer JustCode ignore?
How to Add JustCode Filters
JustCode supports filters that essentially "hide" errors and warnings for specific files. A filter works by matching any part of a file's full path (case insensitive). By default, JustCode ships with these filters enabled:
These four filters, separated by semicolons, will hide any errors or warnings generated by files with ".designer.cs/vb" or "\Reference.cs\vb." Designer and Reference files usually contain auto-generated code in Visual Studio, which is why we want to ignore them.
To edit filter settings, use the Visual Studio JustCode menu to navigation to Options > Code Analysis > General where you'll find two textboxes: Exclude file filters and Exclude project filters.
To eliminate all minified script errors and warnings, I'm going to add a filter to tell JustCode to hide these issues for any file that has .min.js in the path.
I navigate to JustCode > Options > Code Analysis > General and add ";.min.js" to the existing filters in the Exclude file filters textbox, producing:
Once I save my new settings, JustCode updates the error and warning reporting UI (the only part of JustCode that runs in the Visual Studio process, I might add- that's how JustCode avoids creating VS lag). We now find that my project has only 2 errors, which I rightly should consider addressing.
Today, JustCode's filtering only supports matching the strings you provide in file and project paths. There is no support for wild cards or other more advanced pattern matching techniques (like RegEx). That said, the product team has received feedback from enough customers to add more power to JustCode's filtering abilities, that you'll very likely seem more advanced options for filtering in the future. Until then, you should find that even this basic filtering enables you to cover 90% of the common cases where you why JustCode to hide errors and warnings.
So, setup those filters and make sure the errors and warnings JustCode is reporting are the ones that truly need your attention!