Open bipster opened 4 years ago
Actually, I think I misunderstood the code. Does the plugin look at the project's CodeClimate config at all (e.g. if there's a .codeclimate.json file in the root)? The analysis via the plugin never finishes, which I solved via command-line by excluding files via the config.
@bipster you're right, if you want to exclude you have to use codeclimate configuration file. Anyway, I have a plan to support multiple codeclimate projects in next release, hope it helps.
Thanks, @nhat-phan !
Even when I exclude all files via the config file, the plugin still claims there are 1,200,000 lines of code and I have to kill it after half an hour of no results. When I do the same via the command line it finishes in seconds.
I think I just realized the problem:
My folder structure is like this:
/project_root/.codeclimate.json
/project_root/module1/
/project_root/module2/
/project_root/module3/
/project_root/module4/
When I am running the CLI, I run it from /project_root
.
But in my IntelliJ project, I don't load /project_root
-- my project is set up so only the four modules are loaded. I think I have to move my .codeclimate.json
into /project_root/module1
and exclude paths like "../module2/excluded.txt"
?
I tried to let the plugin analyzation go as long as it needed but get "error: (CC::CLI::Analyze::EngineFailure) engine duplication ran for 900 seconds and was killed". I increased IJ's memory to 4G, and Docker's to 5G, but the CPU still runs at 400+% and the memory usage spikes. Neither happens when I run from the command-line.
The plugin currently has an undocumented requirement for the JSON configuration, so if a project has an existing YAML config, that's silently ignored. Allowing this to be specified, or at least making the requirement clear in the docs, would help adoption for projects that require excluded files/directories.