CoDe
CoDe

Reputation: 11156

How to get rid of Sonar Report message 'File does not end with a newline.'

I'm integrating Sonar to generate a report for one of Android-Kotlin project.

It's done but it generated the report with Code Smells & most of are related with message "Checks whether files end with a line separator." which are nothing but just a warning message at the end of the file.

Any suggestion how this can be avoided.

Upvotes: 0

Views: 983

Answers (1)

Denysole
Denysole

Reputation: 4051

1.Open you SonarQube server in browser (default URL is http://localhost:9000/)

2.Perform log in (default login - admin, password - admin)

3.Then go to Quality Profiles:

Quality profiles

4.Copy Java profile and name it as you like:

enter image description here Newly created profile will open immediately.

5.Open active Code Smells rules:

enter image description here

6.Search required rule and click deactivate:

enter image description here

7.Go back to Quality Profile and set your profile as default:

enter image description here

In this way you can deactivate any built-in rules, also you can create you own rules, more details you can get from this article.

Upvotes: 1

Related Questions