green-code-initiative / ecoCode-android

Reduce the environmental footprint of your Java-based Android apps with SonarQube
https://ecocode.io
GNU General Public License v3.0
54 stars 17 forks source link

Solution to deal with the scope File System required by some smells #60

Open olegoaer opened 1 year ago

olegoaer commented 1 year ago

File System Scanner

Some smells detection are based on the File System, not on code scanning.

Proposed Solution Create a new sensor dedicated to that concern, FileSystemSensor, registered at the plugin level. To maintain performance, this sensor should only be triggered once. In the execute() callback, there is a parameter of type SensorContext which allows access to the file system (ex: sc.baseDir())