Skip to main content
path: root/codan
AgeCommit message (Collapse)AuthorFilesLines
2016-06-22Move the rest of the CDT plugins to java 8Marc Khouzam27-45/+45
This change was generated using the script: releng/scripts/ Change-Id: I2ad96dc682a5acb8529c3edec40de279c331b5a4
2016-04-25Bug 492230 - Replace buffer.append(a+b) callsAlex Blewitt1-1/+1
When using a `StringBuilder` or `StringBuffer` to create a string message, using implicit string concatenation inside an `.append()` call will create a nested StringBuilder for the purposes of creating the arguments, which will subsequently be converted to a String and then passed to the outer StringBuilder. Skip the creation of the intermediate object and String by simply replacing such calls with `buffer.append(a).append(b)`. Where values are compile time String constants, leave as is so that the javac compiler can perform compile-time String concatenation. Ensure that NEWLINE isn't appended in such a way since it is not a compile time constant `System.getProperty("line.separator")` Change-Id: I4126aefb2272f06b08332e004d7ea76b6f02cdba Signed-off-by: Alex Blewitt <>
2016-04-21Bug 492200 - Replace StringBuffer with StringBuilderAlex Blewitt2-3/+3
There are many opportunities for replacing `StringBuffer` with `StringBuilder` provided that the type isn't visible from the public API and is used only in internal methods. Replace these where appropriate. Change-Id: Ic2f50c5b6f3c3a4eae301bb3b40fb6faed235f79 Signed-off-by: Alex Blewitt <>
2016-04-21Cosmetics.Sergey Prigogin1-15/+14
2016-04-21Bug 492200 - Replace StringBuffer with StringBuilder where appropriateSergey Prigogin1-1/+1
Change-Id: Ib52b839a211e2068e56da4b62a5b9640fef55d40
2016-04-19Bug 491984 - Replace .equals("") with .isEmpty()Alex Blewitt1-2/+2
In many cases a String's empty status is tested with `.equals("")`. However, Java 1.6 added `.isEmpty()` which can be more efficient since it compares the internal length parameter only for testing. Replace code using the `.isEmpty()` variant instead. Some tests for `"".equals(expr)` can be replaced with `expr.isEmpty()` where it is already known that the `expr` is not null; however, these have to be reviewed on a case-by-case basis. Change-Id: I3c6af4d8b7638e757435914ac76cb3a67899a5fd Signed-off-by: Alex Blewitt <>
2016-04-16Bug 491825 - Remove primitive wrapper creationAlex Blewitt1-2/+2
Using `new Integer` and other wrapper types such as `new Character` results in potential extra heap utilisation as the values are not cached. The built-in `Integer.valueOf` will perform caching on numbers in the range -128..127 (at least) using a flyweight pattern. In addition, parsing `int` values can be done with `Integer.parseInt` which avoids object construction. Adjust tests such as `"true".equals(expr)` to `Boolean.parseBoolean(expr)`. Change-Id: I0408a5c69afc4ca6ede71acaf6cc4abd67538006 Signed-off-by: Alex Blewitt <>
2016-03-17removing API for custom preference listeners in codanAlena Laskavaia5-131/+8
- this is replaced by eclipse preference listeners framework Change-Id: Ia39041c79c643912c883d7fdf507aeb252f13ddc
2016-03-15Bug 489553 - ConcurrentModificationException belowAlena Laskavaia2-37/+47
MapProblemPreference.clone Change-Id: If80417f386890495961745d13b3ad16040677e2e
2016-02-23Bug 486610 - Fixed a highlight problem in reportProblem methodAlisson Linhares de Carvalho2-5/+20
Every time we report a problem in a declaration/expression that occupies more than one line, the codan marks the entire line as a problem - including everything before the node. This patch solves this inconvenient behavior. See for a complete explanation. Change-Id: I742cbaac8a1392676695d574355597b0cfc87385 Signed-off-by: Alisson Linhares de Carvalho <>
2016-02-22Code cleanup in Codan tests.Sergey Prigogin25-377/+383
Change-Id: Ib6fbc348ef175441029a17dd2129d95aaee3305f
2016-02-11Update copyright datesMarc Khouzam23-23/+23
Change-Id: I94ac38c37657e270f62db9bbd2859c2c6de40e5f
2016-02-01Missing copyright header.Marc Khouzam3-1/+22
Copyright assigned to company of the committer who did the first commit of the file. Change-Id: Ia133694018c798f9558258810982f5276737a0b0
2016-01-18Incremented CDT features version to 9.0.0Marc Khouzam7-7/+7
This includes bumping the standalone debugger to 9.0.0 Change-Id: I55fae1cec995b5f6865a5b174c004ed1b76e9bea
2016-01-11codan - deprecating IProblemProfileChangeListenerAlena Laskavaia5-21/+38
deprecated IProblemProfileChangeListener in favor of eclipse preference event listener mechanism Change-Id: Ie89999f3baeed56a4c13f3ba70a92b59213ae43f
2016-01-11Fixed codan example for pref change listenerAlena Laskavaia2-62/+37
Change-Id: I8693a4bdfd14a05ca077ec3357f82a2358bee07d
2016-01-11Bug 383576 - Ability to ignore codan errors using line commentsAlena Laskavaia10-22/+176
Change-Id: I806e1787fb6cc3be8865cee1d397d581ae4acd8e Signed-off-by: Alena Laskavaia <>
2016-01-08Removed deprecated method in codan.core, bumped version to 4.0Alena Laskavaia9-78/+19
Change-Id: I1290d5388b30bd6b48663652d50f4718164b979d
2016-01-07fixing some commentsAlena Laskavaia2-40/+24
Change-Id: I020815ce6099d743067974a97b8b63539e408f15
2016-01-07Bug 411579 - Add a "Create new class" Quick fix.Alena Laskavaia8-17/+147
Change-Id: I57dc46f079357de7d5c281d016a25baa3f2154a6
2016-01-03Fix copyright of all CDT plugins using the copyright tool from platform.Marc Khouzam155-157/+157
This commit does not add missing copyrights, just updates the date on the existing ones. Change-Id: I646f5afd533a1fcc539bdf2e0686b22f406ecf65
2015-12-29Fix an "unsafe method call" error.Nathan Ridge1-1/+2
Change-Id: I174b14358cdf4252dfb5293c4b86ecfe873fb845 Signed-off-by: Nathan Ridge <>
2015-12-23Bug 484619 - Make sure ProblemBindingChecker reports unresolvedNathan Ridge2-0/+18
user-defined literal operators Change-Id: Idbb157c33b3aae06a00a10f7e7836e96db9f9b63 Signed-off-by: Nathan Ridge <>
2015-12-18cleanup of ControlFlowGraph viewAlena Laskavaia4-83/+179
Change-Id: Ic6be0eedc1e66867efda2b437181da081b2234c0
2015-11-29Bug 479638 - Cache the result of EvalBinding.isConstantExpression() Nathan Ridge1-1/+11
This helps avoid infinite recursion when a variable's initializer references itself. Change-Id: I4667536ebbefd2008afe9003617092a0a5693db0 Signed-off-by: Nathan Ridge <>
2015-09-29Remove reference to java environment in build.propertiesMarc Khouzam1-2/+1
Change-Id: I053158a23d2783879248320a84a9549e28cfb4d1
2015-08-24Bug 471967: preference page does not show up - invalid valuesAlena Laskavaia1-2/+0
Change-Id: I01f0ff56dd76ded66e5b22f53130e5d865440384 Signed-off-by: Alena Laskavaia <>
2015-06-10Incremented CDT feature version to 8.8.0Marc Khouzam7-7/+7
Change-Id: Ib1189a08a5f0225fd676b682dc8a10477ad3acc5 Signed-off-by: Marc Khouzam <>
2015-05-04Incremented CDT feature version to 8.7.0Marc Khouzam7-7/+7
Change-Id: Ife0feaaa9263d2b7797e31d628250bd26caff1b5 Signed-off-by: Marc Khouzam <>
2015-04-06Bug 461538 - "noreturn" attribute in destructor is not accounted forSergey Prigogin2-12/+50
Change-Id: Ia3c3bdfdb26ff18092fd20be02f178ebb71848bb Signed-off-by: Sergey Prigogin <>
2015-04-03Cosmetics.Sergey Prigogin2-27/+24
Change-Id: I473deba48684e751905fbfa487df6fe9146781c2 Signed-off-by: Sergey Prigogin <>
2015-04-03Reverted erroneous commits.Sergey Prigogin2-24/+27
Change-Id: I7e914e27413f102d4b84c62f53f300c4ec5d23e8 Signed-off-by: Sergey Prigogin <>
2015-04-02CosmeticsSergey Prigogin2-27/+24
2015-03-25Remove warnings caused by change to getAdaptable()Marc Khouzam6-7/+7
getAdaptable() in 4.5 M6 has changed to use generics, making casting its result no longer necessary. Change-Id: Idd943216a925576bb72c784b2c5a2a4b8e8b00d2 Signed-off-by: Marc Khouzam <>
2015-03-23codan: added filter field in the problem configuration pageAlena Laskavaia3-2/+24
tree is getting very big. Added tree filter. Change-Id: I49a0b059c794486178b2ba35bbe42b6131c34888
2015-03-18codan: encapsulated builder and added vm var to disable (for tests)Alena Laskavaia8-12/+67
- refactored the code so client who run codan always go though builder to call checkers - added vm arg -Dcodan.disabled=true to be used mostly by junit to not run codan at all Change-Id: Ie85e20f23b6ded8fffe5064adc1f9193a6f9a146
2015-03-09Bug 352407 - Change CharOperation.pathMatch() to take CharSequence'sNathan Ridge2-30/+38
instead of char arrays Change-Id: Ic3cd197c6bafb1ad6d71ad7e3edcf076e844c58b Signed-off-by: Nathan Ridge <>
2015-03-08Bug 352407 - Correctly compare resource path to pattern in codanNathan Ridge3-5/+5
exclusion filter Change-Id: Ic7f9740fa129bb5e05a6156f077af8a8c0d36e7b Signed-off-by: Nathan Ridge <>
2015-03-08Code streamlining.Sergey Prigogin1-19/+3
2015-03-08Cosmetics.Sergey Prigogin1-30/+25
2015-03-06codan: example of CElement checker - external invokeAlena Laskavaia3-0/+174
Change-Id: I0b88fb611372ffdbcceda3d0588c9fb65486cb03 Signed-off-by: Alena Laskavaia <>
2015-03-06codan: added AbstractCElementChecker class Alena Laskavaia2-39/+74
this allows to run on translation unit but without index locking useful for externl tools Change-Id: If0788eee7d322aa4cafb7985e0c8f742c31369ae Signed-off-by: Alena Laskavaia <>
2015-03-05codan: refactored external tool invoke to be more usefulAlena Laskavaia2-50/+77
Change-Id: Ide621e5541febe8fda784605ef4d5e23476669d4 Signed-off-by: Alena Laskavaia <>
2015-03-05added codan marker generatorAlena Laskavaia4-2/+71
its required for some cdt classes like console parsers Change-Id: Ibde68774656a15c735dce08d5f3041dc56a7266f Signed-off-by: Alena Laskavaia <>
2015-03-04updated codan examplesAlena Laskavaia2-40/+49
Change-Id: I30bf2da294ec613917ce0f836f61709b1af9b513 Signed-off-by: Alena Laskavaia <>
2015-03-04codan - tracing options for printing checker statsAlena Laskavaia4-32/+146
Change-Id: Ia0d1be6fc6be6092ae4b1dac84dff24fb722b1d5
2015-03-03converted codan test to use comment labels positioningAlena Laskavaia1-27/+14
Change-Id: Ib389c90a8b10abac46399248f435428e27b6975b
2015-02-27adjusted message for comment checkerAlena Laskavaia1-4/+4
Change-Id: I68e6bf14340e38c7c623b444870596ab917c0b40
2015-02-25codan - checker for commentsAlena Laskavaia7-16/+251
implement few code style rules for comments - no line comments (sometimes enforced) - no nested comments (no /* in block comment) Change-Id: Ib4042a8ffab0dc1c5effd7b77ab6d2f51a1e6cae
2015-02-22codan - code cleanupAlena Laskavaia5-24/+12
Change-Id: I25f1047b9b07388adeeab38ba7679ac3109280fb

Back to the top