How to exclude files for MISRA compliance in make file

112 Views Asked by At

I have a repository, which is working on MISRA compliance. In that repository I’ve integrated another repository which does not have any MISRA rules. While compiling the code I’m getting MISRA errors. Unfortunately I cannot change anything in the repository which I’ve integrated as it will cause warranty issues.

Is there any way to exclude the files from MISRA rules in Makefile?

Edit :- Make file snippet

CFLAGS = -o "$@" --misrac=$(MISRA_RULES) --misra-version2004

ADDITIONAL_INCLUDES = \
-I"$(SRC_DIR)" \ 
-I"$(SRC_DIR)\SW" \ 
-I"$(SRC_DIR)\SW\ADDED_REPO" \

MISRA_RULES = 1.1,1.2,10.1,.....9.3 (all rules of MISRA)
    

PS - I cannot change MISRA rules, I cannot change any code in ADDED_REPO. All I can do is change make mile. I don’t have to apply the MISRA rules to ADDED_REPO.

0

There are 0 best solutions below