Skip to content

C‐001

Daniel Burgener edited this page Mar 19, 2020 · 1 revision

C-001 checks te file ordering in accordance with the style rules at https://github.com/SELinuxProject/refpolicy/wiki/StyleGuide

Issues with ordering are reported with respect to the closest line with which a given line is out of order. This does not mean that simply reversing the ordering of those two lines will suffice. The misordered line may need to be moved much past the line with which is is misordered.

Ordering issues are only reported in one direction (ie if line 247 should go after line 249, then you may see an issue reported on line 247 or line 249, but not both). SELint attempts to report the fewest number of issues, so if line 247 should actually go after lines 249 and 250, then it will choose to report on line 247, rather than on both lines 249 and 250.

The behavior of this check can be affected by the configuration option "ordering_rules". Setting "ordering_rules=refpolicy" will make suggestions following the Style Guide as linked above. Setting "ordering_rules=refpolicy-lax" will generally follow the style guide, but will ignore issues with the relative ordering of interfaces, and of blocks. One primary benefit of this setting is to support the alternative style of ordering all interfaces alphabetically rather than the order defined in the Style Guide. A future configuration option will support alphabetical interface checking.

Clone this wiki locally