c29d644f56Updated dependencies, attempt to fix NPE, workaround for scheduled removal of a static field in PsiParserFacade. Added PluginVerifier to build.gradle.chrisly422022-08-15 21:39:32 +02:00
01c6b141eeUpdated various dependencies (Kotlin 1.5.21) and AssertJ 3.20.2. Latest Gradle. Migrated to latest intellij-gradle-plugin. Slightly fixed a situation in LightCodeInsightExtension, where the fields were cleared in super-Method before they had been evaluated.chrisly422021-07-16 19:59:38 +02:00
6692ded98aUpdated various dependencies (Kotlin 1.50.0) and AssertJ 3.19.0. Fixed issue#3 reported by hankem where usingRecursiveComparison() was not considered a complex transformation.
v1.12
chrisly422021-05-06 12:42:23 +02:00
146465328cCajon is written in Kotlin 1.4.chrisly422020-10-02 23:14:23 +02:00
47dcc7ec5eDisable TSL 1.3 due to JDK11 bug for sending data to coveralls.chrisly422020-10-02 23:06:38 +02:00
ce0b5ce872Added inversion of boolean conditions inside isEqualTo() and isNotEqualTo() for InvertedBooleanCondition inspection.
v1.11
chrisly422020-10-02 22:34:35 +02:00
d48c71d4eaAdded several cases for hasSizeGreaterThan/LessThan/OrEqualTo() for EnumerablesEmpty inspection.chrisly422020-10-02 19:24:22 +02:00
1340a34782Fixed ImplicitAssertion crashing the plugin with IntelliJ 2020.3 EAP, added support for singleElement(). Unrelated: Documentation grammar fixes.chrisly422020-10-02 18:54:23 +02:00
fbde6b3387Upgraded gradle to 6.6.1. Upgraded kotlin to 1.4.10. Upgraded assertj to 3.17.2. Upgraded junit-jupiter to 5.7.0. Other minor upgrades.chrisly422020-10-02 18:52:50 +02:00
b9110d226eAdded a note about the plugin being for Java language projects only.chrisly422020-10-02 16:21:29 +02:00
45307b364dFixed two possible index out of bounds exceptions in ExtractorReferenceContributor and BogusAssertionInspection. Prepared release.
v1.10
chrisly422020-07-31 17:01:13 +02:00
66b725c4d2Updated libraries to the latest versions (including AssertJ 3.16.1 and Kotlin 1.40-rc). Now uses Gradle 6.5.1.chrisly422020-07-30 21:01:34 +02:00
9b25e50183Improvements for TwistedAssertionInspection to no longer report .class types as constant to bother, nor matches() and doesNotMatch() for regexps. If both sides are constants, they will only show as weak problems.chrisly422020-02-17 20:17:33 +01:00
e8ce8ce2c6BogusAssertionInspection will no longer warn if the expression contains method calls and now tries to avoid valid hashCode() and equals() tests.chrisly422020-02-17 18:33:11 +01:00
62f59b0fe2Added new TwistedAssertion inspection that will warn about assertions with the actual expression being a constant indicating swapped use of actual and expected expressions. Added new BogusAssertion inspection that showing typical copy and paste errors where actual and expected expressions are the same.
v1.8
chrisly422020-02-14 13:28:42 +01:00
58298fabc6Extended Testing-Framework to work around IntelliJ IDEA introducing an unwanted assertj-core dependency conflicting with our newer one.chrisly422020-02-08 16:33:38 +01:00
77d3608fd3Minor NPE Bugfix. Fixed use of "experimental API". Upgraded dependencies.chrisly422019-12-22 19:47:18 +01:00
42429c0f72Added AssertThatComparableExpression for funny compareTo() uses.chrisly422019-11-17 21:21:45 +01:00
8133f3850fAdded first version of AssertThatPathExpression for a limited number transformations (more stuff is possible, but requires detection and transformation of static Files-methods).chrisly422019-11-17 19:10:41 +01:00
8d03b3734cFixed a lapsuus in AssertThatFileExpression also transforming listFiles() with a filter argument.chrisly422019-11-17 17:14:28 +01:00
6dab8ad552Added several transformations to AssertThatStringExpression inspection. Specifically, uses of matches(), compareToIgnoreCase(), indexOf(), and trim().chrisly422019-09-30 20:27:43 +02:00
1983750077Internal refactoring: Reduced code duplication by moving stuff into a common base class.chrisly422019-09-30 17:25:16 +02:00
a0ed4eab76Added new AssertThatFileExpression to move out many common methods from inside the assertThat() expression (exists(), getName(), getParent(), and many more).chrisly422019-09-29 21:56:36 +02:00
acc81863f5Fixed a bug in AssertThatBinaryExpression inspection for assertThat(null != expression) and related that would not correctly invert the condition on transformation.chrisly422019-09-29 12:32:32 +02:00
2b97494c17Really fixed AssertThatGuavaOptional inspections to avoid conversions from .get() to .contains() for array types.chrisly422019-09-25 18:38:35 +02:00
e3444db213Fixes to AssertThatSize inspection after extending it for Maps in previous release as not all combinations for .hasSameSizeAs() are supported. Bumped to IntelliJ IDEA 2019.2.3.
v1.5
chrisly422019-09-24 22:49:14 +02:00
855fb03f7cOne more option for AssertThatCollectionOrMap inspection for warnings without quickfix. AssertThatGuavaOptional inspections will now avoid conversions from .get() to .contains() for array types (currently not correctly supported by AssertJ-Guava).chrisly422019-09-24 22:16:11 +02:00
8d678411b5Fix for AssertThatCollectionOrMap inspection sometimes causing an index out of bounds exception. Added an settings option for AssertThatCollectionOrMap inspection respecting the degenerated case of maps with null values. Upgrade to JUnit Jupiter 5.5.2.chrisly422019-09-09 23:13:45 +02:00
05dc4905caExtended AssertThatCollectionOrMap inspection for several assertThat(map.get()) cases as suggested by Stefan H.chrisly422019-08-23 19:58:11 +02:00
315b93d90dExtended AssertThatSize inspection to Maps, too.chrisly422019-08-23 18:21:08 +02:00
36f63d26d2Minor fix for highlighting of JoinVarArgsContains inspection. Upgraded to kotlin 1.3.50, intellij plugin 0.4.10, assertj 3.13.2, idea 2019.2.1chrisly422019-08-23 18:04:07 +02:00
a4535afbbbFixed references to wrong AssertJ version 13.2.0 instead of 3.12.0, courtesy of Bernhard R.chrisly422019-08-04 18:29:59 +02:00
df11939589New JoinVarArgsContains inspection that will detect multiple .contains(), .doesNotContain(), and .containsOnlyOnce() calls within the same statement that could be joined together using variadic arguments.
v1.3
chrisly422019-08-03 20:57:34 +02:00
4420a0a392AssertThatJava8Optional and AssertThatGuavaOptional inspections do not longer try to fix assertThat(optional).isEqualTo(Optional.fromNullable(expression)) to contains() when expression is not a non-null constant expression.chrisly422019-07-30 20:02:40 +02:00
8fb3ecce95Bumped kotlin to 1.3.41, jupiter 5.5.1, added compatibility with IDEA 2019.2 and fixed regressions with new AssertJ 3.13.0.chrisly422019-07-30 19:42:35 +02:00
5048c898ecFixed broken code in test classes (missing imports, undefined variables).chrisly422019-07-30 19:39:16 +02:00
b84a781134Reverted removed method (identical to default implementation) that causes compatibility problem with older IDEA versions (again, sigh)...chrisly422019-06-23 19:24:36 +02:00
095345a456The JoinAssertThatStatements inspection will now add line breaks on joining statements. Unrelated: Upgraded Gradle to 5.4.1. Upgraded kotlin to 1.3.40. Upgraded jacoco to 0.8.4. Minor style change for immediate returns. Increased test/branch coverage.
v1.2
chrisly422019-06-23 18:51:12 +02:00
5c455c3ca9Fix for multiple JUnit Conversions in batch mode with and without delta creating an exception. Added new AssertThatObjectExpression inspection for toString() and hashCode() and moved equals() from AssertThatBinaryExpression there.
v1.1
chrisly422019-06-09 21:35:23 +02:00
6795622202Finally was able to remove JUnit workaround for test invokation with availability of JUnit 5.5.0-RC1.chrisly422019-06-09 14:17:44 +02:00
828e61a73bNew ImplicitAssertion inspection for implicit isNotNull(), isNotEmpty() and isPresent() assertions that will be covered by chained assertions.chrisly422019-06-09 14:04:01 +02:00
178b7d368aExtended JUnitAssertToAssertJ inspection to convert JUnit assume-Statements, too. Improved JUnitAssertToAssertJ quick fix to swap expected and actual expressions if the actual one is a constant.chrisly422019-05-17 12:17:01 +02:00
e797dc2515Extended documentation about assumeThat() preconditions.chrisly422019-05-16 20:06:14 +02:00
94c695617aImproved JoinAssertThatStatements detection of expressions with side-effects and added pre/post-increment/decrement detection.chrisly422019-05-11 13:40:37 +02:00
ecb5029154Fixed a NPE in AssumeThatInsteadOfReturn inspection quickfix for empty else branches. Fixed missing description for AssumeThatInsteadOfReturn inspection. Added new AssertThatCollectionOrMapExpression inspection that tries to pull out methods such as isEmpty() or contains() out of an actual assertThat() expression. Added more method calls that are considered extension points.
v1.0
chrisly422019-05-06 20:12:54 +02:00
0e2007641cCompatibility fixes for IDEA <= 2019.1 :-/chrisly422019-05-05 20:06:12 +02:00
eab50f590bAdded a first version of a new inspection that tries to detect bogus uses of return statements in test methods and replaces them by assumeThat() calls. Removed oraclejdk8 from travis-ci. Added custom Jupiter DisplayNameGenerator for user friendly test names in report. Extended documentation. Removed Playground.
v0.8
chrisly422019-05-05 19:02:35 +02:00
6a36294a2bAdded travis Build Status to readme.chrisly422019-05-04 16:15:36 +02:00
0b79a6d7dcAdded early bail-outs via simple text matchings to optimize speed of false positive detection.chrisly422019-05-04 15:54:27 +02:00
6fb23ea89cHeavily reworked inspections for edge cases, such as multiple isEqualTo() calls inside a single statement. Corrected highlighting for most inspections. Lots of refactorings, tweakings. Added travis-ci file (untested). Added jacoco.chrisly422019-05-04 15:36:04 +02:00
362c4210a5Fixed isEmpty() for enumerables and strings and isNull() for object conversions to be applied only if it is the terminal method call as isEmpty() and isNull() return void.chrisly422019-05-01 13:07:05 +02:00
e55acf9c74Extended test cases for AssertThatBooleanCondition and AssertThatObjectIsNullOrNotNull.chrisly422019-04-29 20:10:55 +02:00
0b2ce470dbFixed missing description for JoinAssertThatStatements and detection of equivalent expressions.chrisly422019-04-29 19:42:46 +02:00
941ddfdb5eImplemented first version of JoinAssertThatStatements inspection that will try to merge assertThat() statements with the same actual object together, preserving comments.
v0.7
chrisly422019-04-28 20:43:42 +02:00
666e373405Extended AssertThatSize inspection to transform hasSize() into hasSameSizeAs(), if possible.chrisly422019-04-23 20:16:43 +02:00
8b0da63f86Another fix for AssertThatGuavaOptional inspection regarding using the same family name for slightly different quick fix executions (really, Jetbrains, this sucks for no reason). Consolidated location of methods.chrisly422019-04-23 18:19:47 +02:00
66508ceb2cNew AssertThatInstanceOf inspection that moves instanceof expressions out of assertThat(). Fixes to documentation.
v0.6
chrisly422019-04-22 18:52:09 +02:00
db02f7fb93New AssertThatInvertedBooleanCondition inspection that will remove inverted boolean expressions inside assertThat(). Renamed a few inspections to better/shorter names (and fixed file and directory names accordingly).chrisly422019-04-20 18:40:38 +02:00
a707eee9adExtended AssertThatSize intention to take strings and CharSequences into account, too.chrisly422019-04-20 09:04:38 +02:00
533c20906aAdded a note on referencing. Moved AssertThatStringExpression to a more appropriate place in documentation.chrisly422019-04-19 19:43:20 +02:00
da83f7f101New AssertThatStringExpression that will move isEmpty(), equals(), equalsIgnoreCase(), contains(), startsWith(), and endsWith() out of actual expression. Bumped intellij-plugin to latest version.chrisly422019-04-19 19:33:14 +02:00
faeb509797Fixed default method not available in IDEA <2018.3. Sigh :-(chrisly422019-04-18 22:29:30 +02:00
9f91fb3ccfAdded support for referencing and refactoring inside ``.extracting()`` methods with fields, properties and methods (though getter renaming does not work that perfect, but I'm giving up for now as the IntelliJ SDK docs are seriously lacking). Fixed an exception in batch mode if the description string was the same but for different fixes. Now descriptions are different for quick fixes triggered by AssertThatJava8OptionalInspection and AssertThatGuavaOptionalInspection. Minor refactorings. Extended documentation.
v0.5
chrisly422019-04-18 22:12:48 +02:00
b58d8cfd2fFix for incompatible method call regarding IDEA <2018.2. Heavy refactoring regarding quick fixes (using more extensions). Even more refactoring. Fixed/extended AssertThatGuavaOptionalInspection regarding static. imports and wrong reference to core assertThat() where Guava assertThat() actually was necessary.chrisly422019-04-13 18:35:49 +02:00
4e6d53b3dcReduced minimal supported IDEA version from 2018.2 to 2017.2. Added AssertThatGuavaOptional inspection. Prepared next release. Bumped to Kotlin 1.3.30.
v0.4
chrisly422019-04-11 23:55:35 +02:00
d49b7bf17bOptimized even more code. Fixed BinaryExpression for Boolean.TRUE/FALSE. Added new AssertThatJava8Optional inspection. Added changelog to README.chrisly422019-04-11 16:26:11 +02:00
c1d8ade7b1Optimized code. More kotlin-style stuff. Made detecting of Boolean.TRUE/FALSE available to all constant evaluations.chrisly422019-04-08 11:54:22 +02:00
bdabcc7255Removed TODO about AssertThatBinaryExpressionIsTrueOrFalse.
v0.3
chrisly422019-04-07 11:37:10 +02:00
5812e72227New inspection AssertThatBinaryExpressionIsTrueOrFalse that will find and fix common binary expressions and equals() statements (more than 150 combinations) inside assertThat().chrisly422019-04-07 11:29:07 +02:00
51703e8499Merged AssertThatObjectIsNull and AssertThatObjectIsNotNull to AssertThatObjectIsNullOrNotNull. Extended tests to be more explicit regarding the expected quick fix messages.chrisly422019-04-06 17:41:32 +02:00
ba56325299Internally: Upgraded to AssertJ 13.2.2. Support for hasSizeLessThan(), hasSizeLessThanOrEqualTo(), hasSizeGreaterThanOrEqualTo(), and hasSizeGreaterThan() for AssertThatSizeInspection (with AssertJ >=13.2.0). Really fixed highlighting for JUnit conversion. Sorry. Fixed testing code to work against IDEA 2019.1.chrisly422019-04-06 16:53:20 +02:00
5d91eaf276Fixed descriptions and quick fix texts. Fixed highlighting of found problems and also 'Run inspection by Name' returning nothing.
v0.2
chrisly422019-04-01 16:44:52 +02:00