I'm using Netbeans IDE 8.1 version for MVC (Codeigniter). In Model i'm getting warning like Class Length is 251 Lines (200 allowed).
What is exact meaning of this warning and if not resolved, then what exactly will happen ?
First, this warning is nothing to do with CodeIgniter. NetBeans is simply giving you a friendly advisory warning that your PHP class is more than 200 lines long (251 lines in your case).
Nothing bad will happen if you get that message, but you may or may not appreciate it. Either way, it can be configured as follows:
The message can be suppressed entirely if it is considered unhelpful.
Alternatively, the message can be shown as an "Info", "Warning" or "Error" message. By default it is a warning message.
The number of lines allowed before the message is displayed can be adjusted up or down as desired. The default is 200 lines.
Configure the message as follows:
Tools menu -> Options -> click the Editor icon -> click the Hints tab.
Select PHP from the Language drop list.
Select the Too Many Lines node from the list of message categories, and expand it.
Simply uncheck Class Declaration if you don't want to see the message at all.
Otherwise, select the severity of the message from the Show As drop list, and adjust the default line threshold of 200 if appropriate.
Here's the configuration screen:
Finally, note that these configuration settings are global. I don't believe it is possible to customize the message individually for each PHP project.
Related
Intellij is giving me a bunch of squiggly red lines:
All of these lines are in javadoc, for situations like the following:
/**
* field representing column xyz from table some_table_name in the database
*
* #see some_table_name.
*/
private int xyz;
The squiggly line is on the character after ., as it's expecting this to be a path to a class instead of a misuse of the javadoc #see annotation. Moreover, when I click on the squiggly line and click the lightbulb to see quickfix options, it only offers to change the visibility of the variable (private/public/protected), which has nothing to do with the error.
I know that this isn't a real error because the application will still build and run without issue.
Now I'm not able to allowed to change this file, because it's nominally part of core business logic. Instead I would like to disable this kind of inspection so IntelliJ doesn't give me the squiggly red line for the rest of time. Exhaustive searching turning off the "Declaration has problems in Javadoc References" inspection, which I've done:
Apparently this change isn't working with whatever's doing the inspection, because I'm still getting the error. Why is it not working, or what else do I need to change to get IntelliJ to stop flagging this error? Alternatively, is there some way to turn off error-checking as a whole for just this file?
My version of IntelliJ is 2021.1.1 (Community Edition) Build #IC-211.7142.45
CLion 2016.2 helpfully detects potential errors in the file you're editing, which can be seen in the validation bar to the right of the code.
That's just a single file though, is there a way (like a tool window) to get a list of all such warnings in the whole project, or specific parts of it?
Bonus points if it also lists warnings and errors from the compiler, though that's less important, because the compiler output already includes any it found.
Yes, it is possible. The feature you are looking for is called the Inspector.
Do: Find Action... | Inspect Code. It will show a pop-up that will allow you to select the scope: file, whole project, custom, and the Inspection profile (you can choose the type of errors you want to see):
After clicking OK, this is an example of the output, that you can navigate with the mouse or with keyboard shortcuts:
In version 2017.2, I have it under Code | Inspect Code....
You can also right click a folder in Project view and select Inspect Code... there to be able to check only that folder.
IntelliJ show the squiggly red underline under require paths (node.js) that it can't find. In my case, I have a file that is copied to a particular place on installation. Their location in the source has nothing to do with their location in the installation. Its especially annoying because intelij shows that red underline for all folders in its file browser.
var x = require('./some/invalid/path')
I like that it has this check, but I want to disable it for this file since it doesn't make sense for that case. How can I do this, ideally in intelliJ 12?
That's how you suppress an inspection for a class, method or statement:
Place your cursor inside the warning statement, press Alt + Enter, choose the entry that describes your warning, and from the sub-menu select Suppress for class or statement.
You will find more info on the IDEA webhelp.
I found a dumb way to do it - make the require path an expression rather than a simple string literal like this:
var x = require('./some/invalid/path'+'')
I guess it confounds intellij enough that it just says "screw it its probably fine".
I am using the JDeveloper IDE to build a Java application and, at some point, my error pane has stopped appearing to display compile errors.
When I alter the code to intentionally produce errors during compilation (such as deleting a required parenthesis or brace, etc), I will be informed that there were errors during compilation within the "Messages - Log" window. However, I cannot find the window which describes the errors occuring and their location in the code.
Basically, I just want to access the window that lists the errors found, what class they are located in and what line or method they are in. How do I do this?
Try from menu Window > Reset Windows to Factory Settings.
I'm working with Intellij Idea 10 and Java 6 JDK Update 7. When I run Build --> Rebuild Project command, and the (javac) compilation generates warnings, Idea doesn't display what those warnings exactly are in the Messages view. I just see an "Information: XX warnings" node, but no way to expand it to see the actual warnings. Or I just see a message "Compilation completed successfully with XX warnings" on the status bar. For errors, Idea displays the error information (error message, filename, line number etc.) automatically. How can I get it to work similarly with warnings?
(For the record, I've already tried using additional command line parameters such as -Xlint, but it does not make a difference.)
Make sure that "Hide Warnings" option is disabled in the Messages panel on the left: