Checkstyle throwsindent property not available - checkstyle

My checkstyle indentation module does not have "throwsIndent" property. Is there any alternative available for this property?
Checkstyle doc where "throwsIndent" is present -
http://checkstyle.sourceforge.net/config_misc.html

The throwsIndent property of the Indentation check was added with Checkstyle 5.7, which is the latest version at the time of this writing. As far as I know, there is no workaround for this property for Checkstyle versions prior to 5.7.
So your best bet is to upgrade your Checkstyle version. If you are using Eclipse, you can upgrade to the latest version of the Eclipse-CS plugin, which will also include the newest Checkstyle. The same is true for CheckStyle-IDEA, the Checkstyle plugin for IntelliJ IDEA.

Related

Can SonarLint be run on JDK 5,6, or 7?

I am trying to install SonarLint for Eclipse Ganymede (3.4.2) - and our project is very old, so we're using JDK 1.5 here. So is it possible to run SonarLint for JDK 5?
First of all, JDK 5 is so old, I can't really be certain of anything...
But here are some key factors that are important to understand:
Java code is analyzed by the Java analyzer (known today as "SonarJava"). SonarLint is a plugin in Eclipse (and other IDEs) that executes the SonarJava, and uses the results from it to annotate the code you are editing.
The JDK version that the SonarJava itself requires to run, is not the same thing as the JDK version of the source code it is able to analyze (= the subject of the analysis). For example, SonarJava may not run at all on JDK 7, but able to analyze code that is written in JDK 6.
If you use SonarLint in standalone mode, it uses its embedded version of the SonarJava, you cannot use another version. If you use SonarLint in connected mode, it uses SonarJava installed in the SonarQube to which you are connected. Here you have some freedom of choice in the version of the SonarJava, but not unlimited, because SonarLint may not be compatible with all versions of SonarJava, for example recent versions require a certain minimum version.
As per the product news, the current version of SonarLint requires Java 8 and more recent Eclipse than Juno. But you may be able to find an older version of SonarLint that can run in an older Eclipse, and support a version of SonarJava that is able to run on your JDK, and analyze code written for your target JDK version.
Based on the above points, you can dig into the older releases of SonarLint and find something suitable. These links should be useful in your search:
Product news of SonarLint for Eclipse. These also include links to the detailed release notes, which usually contain information about the version of embedded SonarJava
Releases of SonarLint for Eclipse
Homepage of SonarJava

PhpStorm showing code error for PHP method

I am curious as to why the following syntax is rejected by my PhpStorm editor:
PhpStorm version: 2016.1.2
Nullable parameters/return types (?User from your example) is a PHP 7.1 feature.
PHP Language Level must be set to 7.1 in PhpStorm settings for this project (although right now it does not produce an error if language is set below 7.1 -- see WI-32136 ticket).
Support for nullable types was added in PhpStorm 2016.2.2 (which is newer than your 2016.1.x)
Conclusion: upgrade your PhpStorm to the latest version (which is 2017.2.1 at this moment). At very least you need to have PhpStorm 2016.2.2 for this particular syntax to be supported 9not showing an error).

IDE's Java runtime (1.8u111) is outdated - this may cause stability issues. Please update to 1.8.0u112 or newer while opening PhpStorm in Ubuntu 16.10

I recently updated PhpStorm to latest version 2017.1 and I get following message while starting PhpStorm
IDE's Java runtime (1.8u111) is outdated - this may cause stability
issues. Please update to 1.8.0u112 or newer
Start the IDE, use Help | Find Action (Ctrl+Shift+A or Cmd+Shift+A on Mac), type "Switch IDE Boot JDK", press Enter.
But If you don't have the latest JDK, download it from:
Download latest JAVA JDK here
And then select the "IDE BOOT JDK" like Tall Liou told.

Is there any way to automatic change package.json's latest or asterisk(*) mark to specific version?

I use npm Node Packaged Modules to manage project library,
But I notice unconditional latest update version make me hell.
(Too many unmet dependencies error..)
So I try to find to change all latest version to my local current version. I find the --save flag make some libraries specific version, but not all. Is there any good way to solve this problem?
As per the NPM documentation, you can use a "semver" string to specify how to match the specific version, or how that version number can change, to control your dependencies as follows:
version Must match version exactly
>version Must be greater than version
>=version etc
<version
<=version
~version "Approximately equivalent to version" See semver(7)
^version "Compatible with version" See semver(7)
1.2.x 1.2.0, 1.2.1, etc., but not 1.3.0
It's also worth reading the node-semver documentation which defines in more detail how to specify and control the versions of your dependencies that match.
The other command to investigate is npm shrinkwrap - this prepares a npm-shrinkwrap.json file (which will be used by npm install instead of package.json, if present) which has the specific versions recorded in it, meaning future npm install's should always give those specific versions. See the NPM documentation for shrinkwrap for further information.

Play framework, upgrade project to latest version

I try to search around but I couldn't find how to upgrade a playframework project to the latest playframework version.
For example my project has been created using playframework 2.3.4 and I wish to upgrade to 2.3.7.
Thanks.
If you're only upgrading from 2.3.4 to 2.3.7, literally all you should need to do is change the play version in your plugins.sbt file to 2.3.7.
addSbtPlugin("com.typesafe.play" % "sbt-plugin" % "2.3.7")
And I guess for good measure run activator clean.
It's only a minor version upgrade, so between 2.3.x versions there are no breaking changes--only minor feature additions and bug fixes.