-
Notifications
You must be signed in to change notification settings - Fork 1
Lint
The linter ensures that code conforms to proper style standards. RDFS conforms to the Google C++ Style Guide. RDFS uses cpplint to automate code style checks.
$ sudo pip install cpplint==1.3.0$ virtualenv env
$ source env/bin/activate
$ pip install cpplint==1.3.0$ pip install cpplint==1.3.0
$ ./.ci/test/lint.sh
# lint.sh will exit nonzero if there are any lint errors# Note that invoking cpplint directly will not respect any ignored rules in lint.sh
$ cpplint <file>
$ cpplint --recursive <directory>There is a small number of ignored lint rules, which are incompatible with the legacy code structure of RDFS 1.0.
In general, you should make a best-effort attempt to fix all reported lint errors. Do not simply add it to the list of ignored rules, as this entirely defeats the purpose of a linter. If absolutely necessary, you may add a rule to the list of ignored rules. Please tag a reviewer that appears in the blame here before merging such a change.
If you add a new source directory to RDFS, you will need to tell the linter about its existence. Namely, you will need to add it to SOURCE_DIRECTORIES in lint.sh. Please tag a reviewer that appears in the blame here before merging such a change.
- Preferences > Plugins > search repositories for "CLion-cpplint"
- Preferences > other settings > cpplint option
- On terminal in virtualenv:
- copy
which pythonoutput to "python path" in CLion - copy
which cpplintoutput to cpplint.py path in CLion
- copy
- On terminal in virtualenv:
Rice University COMP 413 2017
RDFS Overview
Development
Workflow
Style