Uploaded image for project: 'Rules Repository'
  1. Rules Repository
  2. RSPEC-113

Files should contain an empty newline at the end

    Details

    • 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

      Description

      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
      

        Attachments

          Issue Links

          1.
          Python RSPEC-2729 Language-Specification Active Unassigned
          2.
          PHP RSPEC-3131 Language-Specification Active Unassigned
          3.
          JavaScript RSPEC-3977 Language-Specification Active Unassigned
          4.
          C# RSPEC-4342 Language-Specification Active Unassigned

            Activity

              People

              • Assignee:
                elena.vilchik Elena Vilchik
                Reporter:
                freddy.mallet Freddy Mallet (Inactive)
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated: