Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Missing report if run from the CLI #7

Open
bzz opened this issue Dec 4, 2019 · 1 comment
Open

Missing report if run from the CLI #7

bzz opened this issue Dec 4, 2019 · 1 comment

Comments

@bzz
Copy link
Contributor

bzz commented Dec 4, 2019

InteliJ has this awesome ability to launch the Inspections from CLI but for some reason using an inspection profile that only includes MethodNamesInspection does not produce any XML report output 😕

The same profile, but run in-IDE, seems to produce the results using Analyze->Inspect Code or Analyze->Run Inspection by Name -> Show method name suggestions.

Although it's still a bit surprising that the number of the results in the output vary between the consecutive runs over the same codebase, with the same settings (from 1 to 10, including suggestions for code snippets in Markdown files).

Steps to reproduce:

  • build&install this plugin
  • clone and import any java project (tested on this, e.g under ~/$project)
  • create a new inspection profile that only includes MethodNamesInspection
    e.g by making a copy of the default one Project_Default_copy, disabling everything and enabling this one by the name
  • run the inspection from CLI e.g
    /Applications/IntelliJ\ IDEA\ CE.app/Contents/bin/inspect.sh \ 
      ~/$project \
      ~/$project/.idea/inspectionProfiles/Project_Default_copy.xml \
      ~/$project/astrid-inspection-results
    
  • actual result: ls -la astrid-inspection-results only includes .descriptions.xml
  • expected result: something like a MethodNames.xml report

Thank you again for the project and please advise if I'm doing something wrong or if this should be treated as feature request, etc.

@onewhl
Copy link
Member

onewhl commented Dec 4, 2019

@bzz, thanks for letting us know!
I never tried to launch the inspections from CLI. I will investigate the problem.
Perhaps we search method name suggestions only for methods inside current open file. I will check the case that you described.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants