Tag Archives: Code Analysis

The Inspection Connection – Issue #4, Duplication Detection

One of the core principles of computer programming is eliminating manual repetition. Not only is repeated code time-consuming to read and review, it is disproportionately complex to maintain and provides a ready source of bugs when one copy changes. Yet … Continue reading

Posted in Tips & Tricks | Tagged , , | Leave a comment

Automatic @NotNull/@Nullable/@Contract inference in IntelliJ IDEA 14

Java annotations are awesome and helpful, but you need to add them by hand. Well, not anymore, because IntelliJ IDEA will do that for you in some quite important cases. Jars in your dependencies are stuffed with methods and sometimes … Continue reading

Posted in New Features | Tagged , , , | 23 Comments

The Inspection Connection – Issue #1, Migration Translation

The release of JDK 8 has introduced a number of new language features into Java vernacular. In this issue of The Inspection Connection, we will examine eight useful inspections that IntelliJ IDEA provides to help you become more fluent in functional … Continue reading

Posted in Tips & Tricks | Tagged , , , | 2 Comments

Better Control Flow Analysis with Contract Annotations and IntelliJ IDEA 13

As we’re closing in on the release date, we’re going to publish more details on the new features of IntelliJ IDEA 13. Today we’d like to tell you about the new @Contract annotation. If you are aware of @Nullable/@NotNull annotations, … Continue reading

Posted in New Features | Tagged , , | 32 Comments

30 Days with IntelliJ IDEA. Inspections

We continue to publish new articles from the 30 Day Guide for learning the fundamental features of IntelliJ IDEA. Today we will talk about such basic thing as inspections. As you know inspections are built-in tools that help you find … Continue reading

Posted in Tips & Tricks | Tagged , , | Leave a comment

Java 8 and Method References in IntelliJ IDEA 12

As you might know IntelliJ IDEA 12 will bring support for new features of Java 8 language. Though this is still in progress, you can try some of these features now in IntelliJ IDEA 12 EAP. Here we would like … Continue reading

Posted in New Features | Tagged , , , | 3 Comments

Validation of unknown tags and attributes in Android XML files

In the latest IntelliJ IDEA 11.1 EAP we’ve added 2 new inspections that warn you about unknown attributes and tags in Android XML resource files and AndroidManifest.xml: IntelliJ IDEA can validate both system attributes and local ones defined in attrs.xml … Continue reading

Posted in New Features | Tagged , | 1 Comment

Integration with Android Lint tool in IntelliJ IDEA 11.1

In IntelliJ IDEA 11.1 we’ve added many inspections based on Android Lint tool, which reports many kinds of potential problems in the sources of your Android project. For example IntelliJ IDEA will notify you about useless views in layout xml files … Continue reading

Posted in New Features | Tagged , , | 1 Comment

New “Magic Constant” Inspection

Have you ever cursed an API which uses magic integer constants instead of the proper enumeration? What should I pass as the titleJustification parameter here? 0 or 1? Can I pass “42″ for the titlePosition parameter? Even Javadoc won’t know. … Continue reading

Posted in New Features | Tagged | 10 Comments

How to check your RegExps in IntelliJ IDEA 11?

In IntelliJ IDEA 11 you can check your Regular Expressions while coding without leaving the IDE. Just invoke the ‘Check RegExp’ intention action on a regular expression and play! Tip: You can turn any string into a regular expression by … Continue reading

Posted in New Features | Tagged , , | 22 Comments