How to set up scanning to my files eslintrc. js

I’m using SonarQube 7.5 and Sonar Scanner

I’ve a JavaScript project which I want to scan it using Sonar Scanner but Files under the project root directory are not scanned and displayed like .eslintrc.js, What should I do to make it appear?


Your version is past EOL. You should upgrade to either the latest version or the current LTS at your earliest convenience. Your upgrade path is:

7.5 → 7.9.6 → 8.9.8 → 9.5 (last step optional)

You may find the Upgrade Guide and the LTS-to-LTS Upgrade Notes helpful. If you have questions about upgrading, feel free to open a new thread for that here.

If the issue persists after upgrade, please come back to us.

I think you may have misunderstood my meaning. We do not plan to upgrade the version because of some restrictions. In this case, how can we scan all the files under the project and include configuration files similar to eslint

This information in the log should be correct. I understand that this file should be displayed on the /code page but not display

While that indicates what configuration you fed the scanner, I expect if you scroll down you’ll find the file was “indexed with language ‘null’”. It’s the same reason your .png files don’t appear in SonarQube.

I don’t think it has anything to do with this, so how can I solve the problem that the scan doesn’t display? It’s similar to the configuration file

Hey there.

In fact you’re right – the cause is a bit different than I thought. .eslintrc.js is considered a hidden file, and the scanner ignores hidden files. This isn’t possible to override.

First of all, thank you for your patience. If I really want to set hidden files or, to say the least, only hidden files .eslintrc.js to be scanned, it is possible to be resolved by modifying the configuration or source code?

Because some irregular code writing in this file needs to be exposed.

I hope you can reply me at your convenience

If you modify your file to, at least temporarily, not start with a . (and therefore not be hidden), you would be able to scan it.

But we only provide suggestions, and the code is not maintained by us

So there is no other way to solve this problem?

I’m happy to pass on the feedback that you’d like to scan these kinds of files – but today the scanner will automatically ignore hidden files, so the only way to analyze these files would be to make them not hidden.