Page Menu
Home
DevCentral
Search
Configure Global Search
Log In
Files
F12297466
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
4 KB
Referenced Files
None
Subscribers
None
View Options
diff --git a/CodeSniffer/README.md b/CodeSniffer/README.md
new file mode 100644
index 0000000..e03cf61
--- /dev/null
+++ b/CodeSniffer/README.md
@@ -0,0 +1,10 @@
+Rejected sniffs:
+
+ - '''Generic.Commenting.DocComment''': code is its own comment,
+ so a doc block to only provide a @var type is acceptable
+
+Future sniffs in master, but not included in last stable release 3.2.3:
+
+ - '''Generic.WhiteSpace.ArbitraryParenthesesSpacing'''
+ - '''Generic.WhiteSpace.LanguageConstructSpacing'''
+ - '''Generic.WhiteSpace.ScopeIndent'''
diff --git a/CodeSniffer/ruleset.xml b/CodeSniffer/ruleset.xml
new file mode 100644
index 0000000..b2196cd
--- /dev/null
+++ b/CodeSniffer/ruleset.xml
@@ -0,0 +1,70 @@
+<?xml version="1.0"?>
+<ruleset name="Nasqueron" namespace="Nasqueron\CodeSniffer\Standard">
+ <description>Nasqueron coding standard</description>
+
+ <!-- Consensual detections -->
+ <rule ref="Generic.Classes.DuplicateClassName" />
+ <rule ref="Generic.CodeAnalysis.ForLoopShouldBeWhileLoop" />
+ <rule ref="Generic.CodeAnalysis.JumbledIncrementer" />
+ <rule ref="Generic.CodeAnalysis.UnconditionalIfStatement" />
+ <rule ref="Generic.CodeAnalysis.UnnecessaryFinalModifier" />
+ <rule ref="Generic.CodeAnalysis.UnusedFunctionParameter"/>
+ <rule ref="Generic.CodeAnalysis.UselessOverridingMethod" />
+ <rule ref="Generic.ControlStructures.InlineControlStructure"/>
+
+ <!-- Less consensual detections -->
+ <rule ref="Generic.CodeAnalysis.EmptyStatement" />
+ <rule ref="Generic.CodeAnalysis.ForLoopWithTestFunctionCall" />
+
+ <!-- Source is not the best project management and doc platform. -->
+ <rule ref="Generic.Commenting.Fixme"/>
+ <rule ref="Generic.Commenting.Todo"/>
+ <rule ref="Generic.Commenting.Todo.TaskFound">
+ <message>Create a task in DevCentral instead of a TODO comment: %s</message>
+ </rule>
+
+ <!-- In a standardized world, every file use α encoding and β EOL. Oh my. -->
+ <rule ref="Generic.Files.ByteOrderMark" />
+ <rule ref="Generic.Files.EndFileNewline" />
+ <rule ref="Generic.Files.LineEndings" />
+
+ <!-- You're writing Nasqueron code. Let's use the Nasqueron code style. -->
+ <config name="tabWidth" value="4"/>
+ <rule ref="Generic.Arrays.ArrayIndent" />
+ <rule ref="Generic.Classes.OpeningBraceSameLine" />
+ <rule ref="Generic.Files.LineLength" />
+ <rule ref="Generic.Formatting.NoSpaceAfterCast" />
+ <rule ref="Generic.Functions.FunctionCallArgumentSpacing" />
+ <rule ref="Generic.Functions.OpeningFunctionBraceKernighanRitchie" />
+ <rule ref="Generic.NamingConventions.CamelCapsFunctionName">
+ <properties>
+ <!-- Allow names like fetchFromAPI, getFS, getProjectsPHIDs -->
+ <property name="strict" value="false" />
+ </properties>
+ </rule>
+ <rule ref="Generic.NamingConventions.UpperCaseConstantName" />
+ <rule ref="Generic.PHP.LowerCaseConstant" />
+ <rule ref="Generic.PHP.LowerCaseKeyword" />
+ <rule ref="Generic.WhiteSpace.DisallowTabIndent" />
+ <rule ref="PSR1" /> <!-- but certainly not the whole PSR-2 -->
+ <rule ref="PSR2.Files.ClosingTag" />
+
+
+ <!-- Write simple code. -->
+ <rule ref="Generic.CodeAnalysis.AssignmentInCondition" />
+ <rule ref="Generic.Files.OneClassPerFile" />
+ <rule ref="Generic.Files.OneInterfacePerFile" />
+ <rule ref="Generic.Files.OneTraitPerFile" />
+ <rule ref="Generic.Formatting.DisallowMultipleStatements" />
+ <rule ref="Generic.Metrics.CyclomaticComplexity" />
+ <rule ref="Generic.Metrics.NestingLevel" />
+ <rule ref="Generic.Strings.UnnecessaryStringConcat" />
+
+ <!-- In modern PHP we trust. -->
+ <rule ref="Generic.Arrays.DisallowLongArraySyntax" />
+ <rule ref="Generic.Functions.CallTimePassByReference" />
+ <rule ref="Generic.NamingConventions.ConstructorName" />
+ <rule ref="Generic.PHP.DeprecatedFunctions" />
+ <rule ref="Generic.PHP.DisallowShortOpenTag" /> <!-- but <?= ?> ok -->
+ <rule ref="Generic.PHP.ForbiddenFunctions" /> <!-- sizeof/delete -->
+</ruleset>
File Metadata
Details
Attached
Mime Type
text/x-diff
Expires
Wed, Oct 22, 12:07 (1 d, 1 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
3092088
Default Alt Text
(4 KB)
Attached To
Mode
rDEVCS Nasqueron codestyle
Attached
Detach File
Event Timeline
Log In to Comment