-
Type:
Code Smell Detection
-
Status: Active
-
Resolution: Unresolved
-
Labels:
-
Message:Add a new line at the end of this file "XXXXXX".
-
Default Severity:Minor
-
Impact:Low
-
Likelihood:Low
-
Legacy Key:MissingNewlineAtEndOfFile
-
Targeted languages:Flex
-
Covered Languages:C#, C, C++, Java, JavaScript, Objective-C, PHP, Python, Swift, TypeScript
-
Remediation Function:Constant/Issue
-
Constant Cost:1min
-
Analysis Scope:Main Sources, Test Sources
-
Checkstyle:NewlineAtEndOfFile
-
ESLint:eol-last
-
Pylint:C0304
-
SwiftLint:trailing_newline
-
TSLint:eofline
Some tools work better when files end with an empty line.
This rule simply generates an issue if it is missing.
For example, a Git diff looks like this if the empty line is missing at the end of the file:
+class Test {
+}
\ No newline at end of file
- is implemented by
-
CPP-586 Rule: Files should contain an empty new line at the end
-
- Closed
-
-
SONARSWIFT-46 Rule: Files should contain an empty new line at the end
-
- Closed
-
-
CPP-707 Create Objective-C rules repository containing targeted rules
-
- Closed
-
1.
|
Python | RSPEC-2729 |
|
Active | Unassigned | |
2.
|
PHP | RSPEC-3131 |
|
Active | Unassigned | |
3.
|
JavaScript | RSPEC-3977 |
|
Active | Unassigned | |
4.
|
C# | RSPEC-4342 |
|
Active | Unassigned |