Warning, /sdk/codevis/doc/semantic_rules.md is written in an unsupported language. File is not indexed.
0001 # Semantic Rules 0002 0003 "Semantic Rules" are a way to provide more information about the system while the code analysis tool is being run. This 0004 enables you to avoid having things placed in the `non-lakosian` automatic group. This is an important feature for 0005 codebases that doesn't follow the lakosian rules described in John Lakos book or if you have a different project 0006 hierarchy between the installed libraries and the source code. 0007 0008 To use the semantic rules feature, the software must be compiled with Python support (Which it is the default). To manually 0009 enable Python support, pass the flag `-DENABLE_PYTHON_PLUGINS=ON` to CMake. 0010 0011 The tool will search for `.py` files in the following places: 0012 0013 - The path defined in the env var `$SEMRULES_PATH` 0014 - In a folder named `semrules` in the application path 0015 - In a folder named `semrules` in user's home directory 0016 0017 For each file found in the code analysis step, the software will search and execute the function `accept(path)` in each 0018 python file in all the paths mentioned. If this function returns `True`, then the software will search and execute a 0019 function called `process(path, addPkg)`. 0020 0021 You can find examples of Python scripts on the `semrules/` folder in the root of the project.