Giter Club home page Giter Club logo

idea-cli-inspector's Issues

Jenkins Pipelining

Hello. I've been looking everywhere for documentation on how to run groovy scripts from the jenkins pipeline script with parameters, but to no avail. Do you have any recommendations on how to run the inspector in a pipeline?

Inspection fails on checkstyle.xml - how to fix?

This is the output I get when running /usr/local/bin/groovy ideainspect.groovy:

#
# Inspecting produced result files in /Users/Shared/Jenkins/Home/workspace/Dev/build/reports/inspection-results
#
# Looking for levels    : [[ERROR]]
--- XmlHighlighting.xml
[ERROR] checkstyle.xml:4 -- URI is not registered (Settings | Languages & Frameworks | Schemas and DTDs) #loc

Line 4 of checkstyle.xml has:
"http://www.puppycrawl.com/dtds/configuration_1_3.dtd"
which was giving an error in my local IDE but I fixed it locally. I cannot figure out how to fix that error without writing a workaround on my Jenkins CI build machine.

I should note that I was running v1.2 - is this issue resolved now? I can attempt using the latest version.

Configure Libraries

Hey, I can't find any information on errors that come out of the inspector run. Do you know of any current documentation for specific errors (like the configure library issue in your example run)? I'm having some issues with the environment, as a wiped repo on my dev machine runs just fine, but a wiped repo on the jenkins server results in errors.

Does it run with other IDEs

Hey,

quick question: does this tool run with other Jetbrain IDEs like PyCharm, RubyMine or CLion?

If so, could you include a sentence that it does so in the first paragraph of the project README?

Thanks :)

Script looks for `idea.sh` for Android Studio installations under Linux

It turns out, that the path-based heuristics to switch between idea.sh and studio.sh is insufficient and does not work for non-MacOS installations.

โ‹Š> ~ ideainspect.groovy  -i /home/ben/devel/android-studio
= IntellIJ IDEA Code Analysis Wrapper - v1.4 - @bentolor
IDEA Installation directory /home/ben/devel/android-studio/bin/idea.sh not found!
Use a IDEA_HOME environment variable or the `ideahome` property in `.ideainspect` 
or the `-i` command line option to point me to a valid IntelliJ installation

CC @ianshowell

Fails to launch intellij idea 2016.01 on OSX

On OSX, the default installation for intellij puts the launch binary at

/Applications/IntelliJ\ IDEA.app/Contents/MacOS/idea

The groovy script looks like it handles windows/linux correctly but not OSX, as it expects bin/idea.sh to exist under the installation directory.

IDEA reporting OK though "Inspection cannot proceed" due to unresolved path variable

Our JDK version is pointed to by a Path Variable.

capture

Which causes a failure and a false pass.

Initializing project...Loaded profile 'Default' from file 'D:\path\.idea\inspectionProfiles\Default.xml'
done.
Inspecting with profile 'Default'
The JDK is not configured properly for this project. Inspection cannot proceed.
$PROJECT_JDK_NAME$ not found
Java HotSpot(TM) Server VM warning: ignoring option MaxPermSize=250m; support was removed in 8.0
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

#
# Inspecting produced result files in D:\path\target\inspection-results
#
# Looking for levels    : [[WARNING], [ERROR]]
# Ignoring result files : []
# Ignoring source files : []

#
# Analysis Result
#
Looks great - everything seems to be ok!

Inspection, compilation, etc. works just fine in the IDE. Support would be nice, but isn't required. False pass is not ok.

For completeness, the variable is stored in .IdeaIC\config\options\path.macros.xml

<macro name="PROJECT_JDK_NAME" value="1.8" />

command line arguments should override .ideainspect file

It seems that if a setting is defined in the .ideainspect file, then it is not possible to pass a different setting through the command line arguments.
This is quite counter-intuitive and not convenient when trying to setup a CI build

Plugin error while inspecting code

Hello!

I'm trying to run the idea-cli-inspector inside a docker container. IntelliJ IDEA should be installed correctly. When executing the inspections I get the following error:

Plugin Error: Plugin 'org.jetbrains.android' failed to initialize and will be disabled. Please restart IntelliJ IDEA.

java.lang.NoClassDefFoundError: Could not initialize class org.intellij.images.fileTypes.impl.ImageFileTypeManagerImpl
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:348)
at com.intellij.openapi.components.impl.ServiceManagerImpl$MyComponentAdapter.getDelegate(ServiceManagerImpl.java:242)

Can you point me to what the problem is? Which IDEA project files (from .idea) are needed to start the inspections? Is there maybe configurations from my local machine leaking into the docker image? How can I make sure the inspections can be run on another machine?

Thanks!
Jochen

Identifying new violations introduced with changes

I the README it says:

IDEA allows you to check for new violations introduced with your changes while you are trying to commit them

How? Is there a way to configure this tool to generate build failures when new warnings/errors are introduced?

Allow to specify fullpath of pom.xml as project path

Hello @bentolor ,

I find your project quite useful and I even created a docker image to run inspections more easily: https://github.com/sylvainlaurent/docker-intellij-inspect

My goal is to help running inspections on maven projects (not pure IJ projects), and until recently I thought I always had to commit many IntelliJ-specific files to VCS.
But I recently played with TeamCity and found out that you can actually specify the path to a pom.xml rather than the root of the IJ project. I observed what TeamCity actually does to launch the inspections: in such a case it does the same thing as your groovy script except that the first argument is the full path to the pom.xml.

Thus, I wonder if your groovy script could be modified to allow specifying a full path to a pom.xml rather than requiring a directory?
I also noticed that the inspection profile XML file is not required to be in .idea/inspectionProfiles, one could have it elsewhere...

Would you like me to work on a pull-request for this enhancement?

required files in repo to run this inspect tool

I would like to run "inspect" on a maven project without checking in .idea files into repo.
This tool takes the path to pom.xml. Will it also generate .iml file and .xml files in .idea folder needed to complete the inspection?

Startup Error: Application cannot start in headless mode

Hi,

I'm trying to use your script to integrate the inspections in CI environment. Unfortunately I keep receiving the following error:
Startup Error: Application cannot start in headless mode

Do you have any idea how to solve this problem? Could it be that it doesn't work anymore in the latest Android Studio version (2.2 preview 5)?

Custom Scopes in Inspections

Goals:

  • Allow users to use custom scopes defined in either Android Studio or IDEA in this app.
  • Allow users to pull the custom scopes from their xml files in the .idea/scopes directory in their project.

Leads:

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.