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
Copy file name to clipboardExpand all lines: src/coding_style/coding_style_manager.cr
+4-5Lines changed: 4 additions & 5 deletions
Original file line number
Diff line number
Diff line change
@@ -40,6 +40,7 @@ require "./all/l2_indent"
40
40
require"./all/l4_curly_brackets"
41
41
require"./all/v1_naming_identifiers"
42
42
require"./all/v3_pointers"
43
+
require"./all/c1_conditional_branching"
43
44
require"./all/c3_goto"
44
45
require"./all/a3_line_break"
45
46
require"./all/h2_include_guard"
@@ -67,10 +68,8 @@ TRAILING_SPACES =
67
68
TrailingSpaces.new(CodingStyleType::G8, FileType::Source.value |FileType::Header.value |FileType::Makefile.value, CodingStyleLevel::Minor, "Trailing Spaces", "No trailing spaces must be present at the end of a line.")
68
69
TRAILING_LINES=
69
70
TrailingLines.new(CodingStyleType::G9, FileType::Source.value |FileType::Header.value |FileType::Makefile.value, CodingStyleLevel::Minor, "Trailing Lines", "No more than 1 trailing empty line must be present.")
70
-
71
71
NAMING_FUNCTIONS=
72
72
NamingFunctions.new(CodingStyleType::F2, FileType::Source.value |FileType::Header.value, CodingStyleLevel::Major, "Naming functions", "All function names should be in English, according to the snake_case convention (meaning that it is composed only of lowercase, numbers, and underscores)..")
73
-
74
73
COLUMNS_NUMBER=
75
74
ColumnsNumber.new(CodingStyleType::F3, FileType::Source.value |FileType::Header.value |FileType::Makefile.value, CodingStyleLevel::Major, "Number of columns", "The length of a line should not exceed 80 columns (not to be confused with 80 characters!).")
76
75
LINES_NUMBER=
@@ -89,12 +88,12 @@ NAMING_IDENTIFIERS =
89
88
NamingIdentifiers.new(CodingStyleType::V1, FileType::Source.value |FileType::Header.value, CodingStyleLevel::Major, "Naming Identifiers", "All identifier names should be in English, according to the snake_case convention.")
90
89
POINTERS=
91
90
Pointers.new(CodingStyleType::V3, FileType::Source.value |FileType::Header.value, CodingStyleLevel::Minor, "Pointers", "The pointer symbol (*) should be attached to the associated variable, with no spaces.")
91
+
CONDITIONAL_BRANCHING=
92
+
ConditionalBranching.new(CodingStyleType::C1, FileType::Source.value, CodingStyleLevel::Minor, "Conditional Branching", "A conditionnal block (while, for, if, else, ...) should not contain more than 3 branchings.")
92
93
GOTO=
93
94
Goto.new(CodingStyleType::C3, FileType::Source.value |FileType::Header.value, CodingStyleLevel::Minor, "Goto", "Est-ce que ta déjà léché les deux boules d'un goto ?")
94
-
95
95
LINE_BREAK=
96
96
LineBreak.new(CodingStyleType::A3, FileType::Source.value |FileType::Header.value |FileType::Makefile.value, CodingStyleLevel::Info, "Line break at the end of file", "Files should end with a line break.")
97
-
98
97
INCLUDE_GUARD=
99
98
IncludeGuard.new(CodingStyleType::H2, FileType::Header.value, CodingStyleLevel::Minor, "Include Guard", "Headers should be protected from double inclusion.")
0 commit comments