Excluding folders from code analysis

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Excluding folders from code analysis

1,464 Views
scottm
Senior Contributor II

How do I get the MCUXpresso IDE (v11.1.1) to skip code analysis on specific folders?

Actually, I'm not 100% sure it's the code analysis module but I can't figure out where this is coming from if that's not it. The issue is that I have Javascript sourcemap files (.map) extension in one folder, which is already excluded from the build, and building the project yields 136,000 results like this:

no viable alternative at character '—'

Obviously this is a little inconvenient in that I'm not able to see any real warnings without scrolling for days. How do I prevent it from trying to parse map files?

Thanks,

Scott

0 Kudos
5 Replies

1,446 Views
ErichStyger
Senior Contributor V

Hi @scottm ,

to disable or exclude files/folder from Code Analysis (CODAN), you have to use the Resource Filter (see https://mcuoneclipse.com/2020/12/29/eclipse-codan-static-code-analysis-for-c-c/).

 

I hope this helps,

Erich

0 Kudos

1,452 Views
converse
Senior Contributor V

If it is not a source folder, then it should not be being scanned. Also a .map file is not a known file extension, so there should be anything that is parsing it.

Can you take a screenshot of the error dialog, showing the problem(s)

0 Kudos

1,449 Views
scottm
Senior Contributor II

This is what the warnings look like. Seems to be the IDE itself trying to parse a .map file, maybe for syntax highlighting. It happens if I just open a file in the editor.

scottm_0-1609267242139.png

 

0 Kudos

1,445 Views
ErichStyger
Senior Contributor V

Hi @scottm ,

try disabling the map file parser, see https://community.nxp.com/t5/MCUXpresso-IDE/MCUX-11-0-map-file-error-incremental-build-not-working/m...

 

I hope this helps,

Erich

0 Kudos

1,440 Views
scottm
Senior Contributor II

Hi Erich,

I'd forgotten about that thread. I remember the RULE_HEX problem, and I think I mostly just worked around the parsing issue by writing my own script to winnow the real .map file down to something less cluttered. I wasn't getting the 'no viable alternative' error then.

I've changed the editor to generic text for all .map files and it doesn't give the warnings when I open the files but it does still show them when I do a clean and build. I can't find anything in the build steps that would indicate what component is doing this.

I'm fairly certain it's my recent addition of Javascript sourcemaps to the project that caused this issue, but it's also worth noting that some of the project settings got trashed while trying to add an SDK driver. Notably, my file exclusions got clobbered for at least one build configuration.

Scott

0 Kudos