I am trying to figure out how I can get Intellij to reprot bad these issues in inspection reporting. This example I threw together shows 4 separate issues that do not get caught in anyway during inspection and I have all inspection settings turned on.
I understand the idea about the nature of Groovy and run-time vs compile-time errors. The issue I see though is that IntelliJ knows there is something possibly wrong here because the IDE underlines and shades it. So since it is aware and has a consistent messaging built-in regarding this type of potential issue, there should be a way to report on it even if it's just a weak warning or something. Instead I am given a clean inspection. Am I missing something in the configurations, is there a way to get this type of issue flagged?
I am using IntelliJ 2020.2 if that matters.
Edit:
To clarify what I am looking for is you can see in the picture the IDE is underline and highlight 4 variables/methods that I am calling that do not exist. Above the first 3 I commented the messaging the IDE gives me when I hover. Yet in the top right corner you can see the Green Check indicating the file passes inspection and is good to go.
So what I want is the inspection to actually not pass and indicate I have 4 potential issues in this file. In a full project the only way to know to know if any issues like this exist is to go line by line through my entire code base since these issues are not actually reported anywhere.
Related
I'm using Intellij IDEA 2017.1.5 with the Golang Plugin.
When I run Analyze > Inspect Code > Whole Project, the Inspection Results always include "Unused Exported Function" warnings, even though my project codes clearly use those functions. The same goes for some Global Variables and Constants.
When I comment-out those "unused" functions and variables, I encounter "Undefined Function" and "Undefined Variable" errors, and when I put them back, the errors disappear, so I know they are actually being used within my project.
Is there a way to make these wrong warnings go away, or "refresh" the compiler's Code Analysis? And is this a known issue with Intellij IDEA or the Golang Plugin in general, and has anybody else encountered this?
It's really annoying because I'm aiming for 0 Warnings and these ones never go away.
Upgrade to IDEA Ultimate 2017.3+ or use GoLand and see if the error still happens.
The plugin for 2017.1 is really old and a lot of changes have happened since then.
If the issue still happens, then report it to https://youtrack.jetbrains.com/issues/Go and make sure to include a way to reproduce issue.
New to VisualStudio 2015, but not to programming. Have searched both Google and here for a lead on this, but considering the available search terms, I might not immediately uncover them.
I was looking into porting an old VB6 (200k+ LoC) to VB.Net in VS2015. Mostly just poking around to determine viability. Using a project converter, and have resolved most of the initial errors, and am familiar with how the Error List works.
However, it is throwing a new one at me. It now only has two lines of error, both showing the same thing. They both say:
" & ErrorName
That's a Quote, Ampersand, and ErrorName. That's all that show up on the error list line. No file. No line number. Double click on them does nothing.
I thought perhaps the project was corrupted, so I completely re-created it, adding all the modules, forms, classes, etc again, and it found a lot more errors to fix, which I fixed, and now these two lines show up again.
Does anyone have any indication where this is coming from, or, better yet, how to fix?
I've seen VB programmers report this misbehavior before, never with a good lead to explain the problem. It is specific to VS2015, the Roslyn integration caused many issues. In general a very buggy release, be sure to apply all available Updates, currently up to Update 3. If you have a license that includes an MSDN subscription then I recommend you install VS2012, the last "good" version of VS that was not yet affected by Microsoft's new focus on agile development.
I think the underlying issue is caused by the IDE simply not parsing the compiler error message correctly. Probably having to do with the statement with the error getting quoted in the message. Getting only part of the statement text and it fumbling quotes is a pretty good hint that this is where it went wrong.
So look at the actual output of the compiler, decent odds you'll now see the full error text. Use Tools > Options > Project and Solutions > Build and Run. Change the "MSBuild output build output verbosity" setting to Normal. After the failed build, use View > Output to see the compiler output. You'll probably have a lot of messages, consider copy/pasting the content.
I just finished skating around that infamous "cannot load main class start" thing, and I got blindsided with a sea of errors:
A friend suggests it might have something to do with com.google, but ultimately can't help me.
I haven't made a single alteration to any of the code so far. Eclipse just started up not being able to run and stayed that way. I think there's a way to fix it but it would require making acute changes at the sight of every single error; work that could be wiped by a cleanup if I'm proved wrong.
Anyone have a clue what the issue is? Thank you for the trouble.
UPDATE: Adding guava as a library relieved the error involving com.google, but threw in a handful of others. This one class file contains 3 of the most common unresolved types I've seen scattered throughout: Logger/LogManagaer, PropertyMap, and CrashReport
Your general problems revolve around not having dependencies in the build path. Eclipse's error messages are pretty clear about this; e.g. if a package name is underlined in red and can't be found, then that means it can't be found, and the obvious solution is to add the library that provides it, so that it can be found.
In virtually all cases here, a Google search for the missing packages and classes will lead you to the packages that contain it.
For each unresolved dependency, find the library, add it to the build path, then move on.
I also suggest consulting the documentation that comes with the source code you are attempting to compile, which often simply lists the dependencies, thus saving you the trouble of hunting them down as you go.
While we could do the internet searches for you and hash this out one step at a time, it's both better and faster for you to do it yourself. Better because if you're messing around with Minecraft source, having at least a basic knowledge of how your tools work is going to help you (I also suggest some of the material at http://docs.oracle.com/javase/tutorial/). Faster because the turnaround time of typing package names into the Google search box is a heck of a lot faster than constantly updating your question here and waiting for replies.
It looks like you are missing the Google Collections package, which now is called Guava.
Download the jar file, and add it as a library.
I used to develop a habit in Eclipse to use Error List to check errors and warnings. Is there something like that in IntelliJ IDEA? I don't see it.
Eclipse incrementally builds the whole project all the time and finds all compilation errors even in classes you haven't touched/opened at all.
IntelliJ is not building your whole code base upon every change so there is no such view. The closest you can get is Messages view (available under Alt + 0) but it only shows compilation errors discovered when a file with errors was physically opened (or when the whole project was built).
UPDATE
IntelliJ IDEA 12 will most likely have incremental compilation feature:
Currently supported: incremental compilation of Java, Groovy, resource copying, UI Designer forms, Artifacts, Android, annotation processing, not-null instrumentation
It's also possible to look at tiny red stripes on the scrollbar to find where the errors in a file are located (they couldn't make it less convenient to use :/)
I've been trying to use the JFace ProjectionViewer to implement folding in a standalone Java app. I got the idea from this article:
http://www.eclipse.org/articles/Article-Folding-in-Eclipse-Text-Editors/folding.html
However the source code provided with the article is for an Eclipse plug-in, not for a standalone.
The particular problem I'm having is that I can't get the VerticalRuler to respond and cause folding/unfolding.
Since I get the expected results, i.e. line numbers in the ruler, when I change from using a VerticalRuler to a LineNumberRuler while leaving everything else the same, I think my problem is specific to the implementation of the relationship among the ProjectionViewer, the VerticalRuler, and the Annotations.
My exact question is whether anyone has gotten this to work in a stand-alone code and, if so, how?