You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Often it is impossible or very hard to detect files/lines which do not contain a certain pattern using regular expressions while it is easy to match the files/lines which do contain the pattern.
Therefore, it would be great if the File RegEx rule and Line RegEx rule could be negated to generate an error if a file or line does not match the given regex.
There could be a checkbox on the rule creation popup to enabled/disable the negation.
Example use case: Detect header files without include guards/pragma once
The text was updated successfully, but these errors were encountered:
However, I had to skip the unit tests because they were failing due to path issues with 8.3 path names (I don't have a Linux box around at the moment).
I used this RegEx to detect the include guards: \s*#ifndef\s+(\w+)\s*\n#define\s+\1\s*\n[\w\W]+|[\w\W]*#pragma once\s*\n[\w\W]+
Often it is impossible or very hard to detect files/lines which do not contain a certain pattern using regular expressions while it is easy to match the files/lines which do contain the pattern.
Therefore, it would be great if the File RegEx rule and Line RegEx rule could be negated to generate an error if a file or line does not match the given regex.
There could be a checkbox on the rule creation popup to enabled/disable the negation.
Example use case: Detect header files without include guards/pragma once
The text was updated successfully, but these errors were encountered: