Gogland EAP 15: Inspections, Intentions, Performance, IntelliJ 2017.3, and More

Posted on by

Say good-bye to Gogland EAP 14. Gogland EAP 15 is here, with lots of improvements and important bugfixes. Read on for more details.

Inspections

The new EAP build brings many new inspections. The following cases are now reported:

1. A variable is assigned to its own value. The IDE finds this code suspicious as it may be a bug.

2. Explicit conversion is not possible:

3. The address operator is used on a non-addressable operand:

4. A type used in a switch case mismatches the type of the switch condition:

5. A 0 wrongly used as an argument for string.Replace:

6. A comment is missing a leading space (disabled by default):

7. Snake_case in identifiers. The inspection comes with a quick-fix that can rename the identifier to CamelCase automatically.

8. A variable declaration used as value in a switch condition:

9. An exported function that returns an unexported type.

Intentions

The update introduces two intention actions that generate code for you:

1. The code that initializes structs:

2. Getters and setters for struct fields:

Performance

The update revisits the IDE performance and brings several improvements in this area:

1. The gutter icons that navigate to the interface (that the struct at the caret implements), or to the structs (implemented by the interface at the caret), have gotten faster and now are enabled by default:

2. We’ve changed how Gogland resolves and annotates code, which has resulted in better overall responsiveness.

Completion

Code completion improvements include:

1. Keywords are not suggested inside an interface declaration unless it’s appropriate.

2. The type keyword is suggested in type-assertions:

Misc

1. The go-setup information is now collapsed in the execution output (can be expanded on click):

2. The Copyright plugin now works for Go files:

3. The maximum size of Go files that can be opened in the IDE has increased from 2.5 MB to 4 MB.

4. In the Project tool window, calling the context menu on a folder now offers two new items: Open directory as a project, and Add directory to the project (as a content root).

IntelliJ Platform 2017.3

Following the opening of IntelliJ IDEA 2017.3 EAP, Gogland has switched to the new version of the platform.

Among the new platform’s features are:

1. Faster Git branch operations.

2. Git Log cosmetic improvements: Interactively Rebase from Here is now available in Log; Compact References View and Show Tag Names are now project level settings and not global as earlier.

4. A new REST client which reuses the approach from VS Code and Emacs for testing HTTP requests. To use it, simply open a new Scratch File and select HTTP Requests as its type. This will create a scratch file with the “.http” extension:

5. Several JavaScript and TypeScript improvements:

New and improved refactorings and intentions (ES6): Extract type alias for TypeScript, Convert type alias into interface, updated Extract parameter and Change signature refactorings.

Better Vue.js support.

Auto imports on paste (ES6).

Better ESLint and TSLint integration.

Various improvements in the Stylus support.

The built-in TypeScript compiler can now also compile JavaScript files.

Multiple JavaScript versions per project.

New Emmet syntax for JSX.

Support for Optional Chaining ES proposal.

6. A few database improvements:

Selecting a schema when running an SQL file.

Jumping to the console from a datasource.

Right-side alignment for a numeric data.

XQuery and XPath coding assistance for Microsoft SQL Server.

That’s quite a list. To try all these changes, download the update from our website, update from the IDE (via patches), or even better, use Toolbox App.

Your feedback, as always, is very welcome in our issue tracker.

Happy developing!