1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-04-23 14:42:11 +02:00
Commit graph

70 commits

Author SHA1 Message Date
Jonah Graham
fd9382d8a9 Bug 562494: Update BREE to Java 11
Change-Id: I0c91aafc0cb1b179936acbd4c9df2d961899e3fa
2020-08-24 17:50:56 -04:00
Martin Weber
9e303185f9 Bug 564002: Restore the default pattern of the surefire-plugin
Sets the pattern to the default of upcoming tycho 2.0 in advance.

Signed-off-by: Martin Weber <fifteenknots505@gmail.com>
Change-Id: I31b3fc733d0cb888fbf6f566995ce2043f6cd621
2020-08-13 14:18:47 -04:00
Marco Stornelli
dd88f8ffca Bug 534420 - Added check for nodiscard for classes and enums
Change-Id: I3932f4d23f18f96f8d1c15c18d7d4d991154aca1
2020-04-08 14:26:56 +02:00
Marco Stornelli
14936b92c6 Bug 534420 - Add checker for [[nodiscard]] attribute
Change-Id: I5e40a2d50281b669c62ed48ee1a3a399ca71981c
2020-04-06 09:22:03 -04:00
Marco Stornelli
24ce60ba3f Bug 534420 - Add support for [[maybe_unused]] attribute
Change-Id: I7214b4f9b11a190c81bad50dace87c69fe404886
Signed-off-by: Marco Stornelli <marco.stornelli@gmail.com>
2020-01-30 13:56:44 -05:00
Marco Stornelli
c25c9672dc Bug 485246 - Fix false positive no break at the end of the case
Change-Id: I4712dc9be3c52f3c4b2f9b79d327c43ded36967a
2020-01-19 07:47:30 -05:00
Marco Stornelli
2c266d91fc Bug 515464 - Fix false positive no break at the end of case
Change-Id: I0b82f4d087dd868dc2184d75abd9156986837743
2020-01-19 09:59:50 +01:00
Marco Stornelli
4e73ec9cc6 Bug 559007 - Fix label and tests
Change-Id: I37dd90e972f9ce326695ddd29b49e30c820752cc
2020-01-12 19:51:03 +01:00
Marco Stornelli
abb0b06e2f Bug 559007 - Added new option to C-style cast checker
Add a new option to check in macro expansion. User, if want, can
disable this warning if it's in a macro expansion since the macro
used can be out of control of the user, for example a system
macro like FD_SET could be used.

Change-Id: I0efaaedd09087de87d9340d81ddbd7f2dc1e1abb
Signed-off-by: Marco Stornelli <marco.stornelli@gmail.com>
2020-01-11 14:05:11 -05:00
Marco Stornelli
bacb42110e Bug 546609 - Added checker for magic numbers
Change-Id: Idedcf15f9d5eb3a5d405fe8dc83131f1faf0efa3
Signed-off-by: Marco Stornelli <marco.stornelli@gmail.com>
2020-01-04 12:09:38 +01:00
Marco Stornelli
2e761a5359 Bug 545714 - Added a shallow copy checker
Change-Id: I8998a98f9d7836405afcaf54bf241b0acbd9edea
Signed-off-by: Marco Stornelli <marco.stornelli@gmail.com>
2020-01-03 14:11:08 -05:00
Marco Stornelli
55e08c0dfa Bug 273252 - Added checker for variable masking
Added new checker for variable masking another in a parent scope

Change-Id: Icff6b6499a1d38cc5a719d143552bbe17d57b15c
Signed-off-by: Marco Stornelli <marco.stornelli@gmail.com>
2020-01-03 02:17:30 -05:00
Marco Stornelli
42daf203a6 Bug 552076 - Fix false positive virtual method with qualified name
Change-Id: Iaf82368fce793f9c23d6e8a13d88bf57282f9ae9
Signed-off-by: Marco Stornelli <marco.stornelli@gmail.com>
2019-10-17 17:54:34 +02:00
Marco Stornelli
fa012eb7d4 Bug 545704 - Added checker for float comparison
Change-Id: Id5529b9bd5ee38bac5f5b7e8adab741f0bce3f8e
Signed-off-by: Marco Stornelli <marco.stornelli@gmail.com>
2019-10-17 00:58:22 -04:00
Marco Stornelli
f8316e315b Bug 545977 - Added checker for variable initialization
Checker checks for multiple declarations on one line and
static variables defined in header files.

Change-Id: Ibc9670ee129e9bdd3ea58ac5409493fd99c4a234
Signed-off-by: Marco Stornelli <marco.stornelli@gmail.com>
2019-10-13 08:29:11 +02:00
Marco Stornelli
6504d1a917 Bug 546173 - Add a check for returning of local variable addresses
Change-Id: Ief17af55c20b6e075381fa22a9208b7dfa67ec0b
Signed-off-by: Marco Stornelli <marco.stornelli@gmail.com>
2019-10-12 09:11:24 +02:00
Marco Stornelli
a159173a51 Bug 545954 - Added checker for functions/methods blacklist
Change-Id: I69d32f166e09ec38e4bf3dd9eaca2643c2e2d01e
Signed-off-by: Marco Stornelli <marco.stornelli@gmail.com>
2019-09-23 01:10:46 -04:00
Marco Stornelli
39be625d8e Bug 549466 - Quick fix with the same resolution
We have the "universal resolution" in an ArrayList and they are used as
single instances. So what can happen here is that we add the same
universal resolution instance multiple times for several markers.
However this approach can't work because a "marker resolution" is
designed to fix a single problem. Indeed the last marker analyzed
override the previous one in the single "universal resolution" instance,
so what we have is N proposals pointing to the same resolution where the
problem description is just the latest one. To solve the problem we
instantiate the universal resolution multiple times.

Change-Id: I072ca0b4dabff9781d6230a218eeb7dd388c648d
Signed-off-by: Marco Stornelli <marco.stornelli@gmail.com>
2019-09-22 07:14:09 -04:00
Alexander Kurtakov
1e42e5f0e1 Convert new Runnable to lambda.
Change-Id: I8b827013a29802a3f3ae6400ddce8d8753eb6399
Signed-off-by: Alexander Kurtakov <akurtako@redhat.com>
2019-08-12 07:11:40 -04:00
Marco Stornelli
4c0e7d9f68 Bug 545959 - Added checker for assignment operator
Change-Id: Ib48742cbc04679ab9e48349f4d68aea5657d38c9
Signed-off-by: Marco Stornelli <marco.stornelli@gmail.com>
2019-07-23 00:47:39 -04:00
Marco Stornelli
90358f5374 Bug 355174 - Improved tests and code for quickfix
Change-Id: I032040e6c4d3c9342ebdbf72b3ba75114810a31f
Signed-off-by: Marco Stornelli <marco.stornelli@gmail.com>
2019-05-30 17:41:05 +02:00
Marco Stornelli
1c147d87ce Bug 545699 - Added quickfix for C style cast
Change-Id: Icc1152c013363c5c1b8c2606e3ad0ceb2aa18aa5
Signed-off-by: Marco Stornelli <marco.stornelli@gmail.com>
2019-05-30 01:09:45 -04:00
Marco Stornelli
3890eec7b7 Bug 355174 - Added quickfix for miss cases/default
Change-Id: I4c815bd55e55d81456efa796453dd2f69a7c876a
Signed-off-by: Marco Stornelli <marco.stornelli@gmail.com>
2019-05-28 19:48:59 +02:00
Marco Stornelli
1204bf21b1 Bug 545956 - Added checker for virtual methods in ctor/dtor
Change-Id: I63b8a40447e9a5b6080e046030677a13607c4ea3
Signed-off-by: Marco Stornelli <marco.stornelli@gmail.com>
2019-05-26 20:26:16 +02:00
Marco Stornelli
1065ee7688 Bug 355174 - Added cheker for missing case in a switch
Change-Id: I1ba1193186e275bed450eb7447eefd90dc09ebec
Signed-off-by: Marco Stornelli <marco.stornelli@gmail.com>
2019-05-26 13:54:27 -04:00
Marco Stornelli
6452688c18 Bug 468742 - Fix false positive no-virtual destructor
Change-Id: Id8d2efaf3f7a5ca74d160e4a726c08a71c6d7067
Signed-off-by: Marco Stornelli <marco.stornelli@gmail.com>
2019-05-18 02:13:30 -04:00
Marco Stornelli
ec6f9d204d Bug 320786 - Fix false negative assignment in condition
Fix bug with expression list

Change-Id: I25b226ec7fd1edcfc40fe2ebcadbd3bdb2a6a5dd
Signed-off-by: Marco Stornelli <marco.stornelli@gmail.com>
2019-05-18 02:10:33 -04:00
Marco Stornelli
f90cd7214d Bug 545702 - Added new checker to verify copyright information
Change-Id: I57cad8565ce3c752a41f89473a95d5427d10cc8b
Signed-off-by: Marco Stornelli <marco.stornelli@gmail.com>
2019-05-16 00:52:48 -04:00
Marco Stornelli
f893b77dba Bug 461435 - Added options to format pointers in methods
Rules used:
1) Default is right alignment to be compliant with built-in formatter
rules;
2) Pointer with declarator without name will be always left alignment
unless there's a nested declarator;
3) Return value of methods/functions is always left alignment;
4) If left alignment is selected, if space after comma is selected too
for a declaration list, space is always forced after the comma.

Change-Id: I82d5ad130e665e5357644cc59655a558f3fb732f
Signed-off-by: Marco Stornelli <marco.stornelli@gmail.com>
2019-05-12 15:42:21 +02:00
Marco Stornelli
695de049db Bug 458850 - Fix false positive for deferred classes
Change-Id: I46335a94d69ae8d4e5ae1c68857344d1dc513328
Signed-off-by: Marco Stornelli <marco.stornelli@gmail.com>
2019-05-12 09:59:22 +02:00
Marco Stornelli
db0cc1f9a4 Bug 468749 - Fix false negative no virtual destructor
The checkers simply skipped nested classes.

Change-Id: If464b229e586267d845768f9d96d3223328a8298
Signed-off-by: Marco Stornelli <marco.stornelli@gmail.com>
2019-05-08 02:23:47 -04:00
Marco Stornelli
838a12d8f4 Bug 545952 - Added checker to check for goto usage
Change-Id: I5f7f157c5c208e686627bb90b001879953d83e70
Signed-off-by: Marco Stornelli <marco.stornelli@gmail.com>
2019-05-08 00:50:59 -04:00
Marco Stornelli
3fcbb5c7b5 Bug 492878 - Fix no-return in function with goto
Change-Id: I39f2605aa2e5b697015a2dfdb795f163e76095cf
Signed-off-by: Marco Stornelli <marco.stornelli@gmail.com>
2019-04-21 13:46:24 -04:00
Doug Schaefer
a7bb1da5e3 Bug 545699 - Add test to suite.
Change-Id: Id8542251403e6e2cc3931500b7f15a036b17a239
2019-04-15 12:07:08 -04:00
Marco Stornelli
60a4cccbe3 Bug 545699 - Added checker for C-style casts in C++
Change-Id: I38076599b354608a4b806f7b1d2ca1f6acc50a44
Signed-off-by: Marco Stornelli <marco.stornelli@gmail.com>
2019-04-15 10:28:39 -04:00
Marco Stornelli
77592ee87a Bug 546179 - Fix lack of warning for field references
With just a reference of the field even for another instance of the
same class the warning wasn't provided to the user.

Change-Id: Icb6ca008c2e61b8a762ecf31e4514cb0368c477d
Signed-off-by: Marco Stornelli <marco.stornelli@gmail.com>
2019-04-07 10:26:15 +02:00
Marco Stornelli
f2635eed74 Bug 545562 - Fix return checker check for template functions
Change-Id: Ie5e3d4560cb3784f6c8393290d64794db56294d7
Signed-off-by: Marco Stornelli <marco.stornelli@gmail.com>
2019-03-21 20:41:26 +01:00
Marco Stornelli
e70a63a424 Bug 519105 - Return checker for functions with noreturn
Added check in control flow graph to check if a function
has noreturn attribute.

Change-Id: Ieaa5984a337493e3aac12c0f6fbeeb91a754358b
Signed-off-by: Marco Stornelli <marco.stornelli@gmail.com>
2019-03-21 19:02:27 +01:00
Marco Stornelli
97e18b4b31 Bug 544980: Added a checker for using directive in header file
Change-Id: Ic77fd2f7504e7a6cc4e15a2fdeb507724db9e74f
Signed-off-by: Marco Stornelli <marco.stornelli@gmail.com>
2019-03-04 09:36:50 -05:00
Bassem Girgis
d8c2330efe Bug 509751 - Process function template with non-dependent return type in ReturnChecker
Change-Id: I8274affff8152dba35233a06cd8cdaef39cf00bb
Signed-off-by: Bassem Girgis <brgirgis@gmail.com>
2019-02-19 18:15:19 -05:00
Jonah Graham
37ed2c406d Bug 540373: Update the compiler warnings/ignores
The previous alignment of all the warnings/ignores
led to too many warnings that weren't there before. This
commit relaxes them a bit.

The core/org.eclipse.cdt.core/.settings/org.eclipse.jdt.core.prefs
is still the "master" copy, with
releng/scripts/check_code_cleanliness.sh containing the
exceptions that apply to test plug-ins.

Change-Id: Ibd4e31ade0b42b31e7cbe5a94f06c6fc15183a56
2018-11-24 10:55:06 +00:00
Jonah Graham
aa1040a21a Bug 540373: Remove '(non-Javadoc)' comments
These were inserted in the past automatically by Eclipse but
newer tooling makes them redundant.

These were removed by doing a global find/replace on *.java files
using the following regular expression:
\t/\*\n\t \* \(non-Javadoc\)[^/]*/\n

Change-Id: I59d3248020f10934fde1dda5b5a31e20bb188e19
2018-11-22 22:00:29 +00:00
Jonah Graham
caf2292768 Bug 540373: Cleanup: Remove redundant type arguments
This was done by selecting all projects in Eclipse then
Source -> Clean Up... -> choosing:
- Remove redundant type arguments
and completing the wizard

Change-Id: Iaecc7010f097b4b1fabd29ccaa34ccb23a716fbf
2018-11-22 21:55:36 +00:00
Jonah Graham
8985c7b63f Bug 540373: Cleanup: Add missing annotations
This was done by selecting all projects in Eclipse then
Source -> Clean Up... -> choosing:
- Add missing Annotations - and selecting all three types:
 - @Override
 - @Override on interface methods
 - @Deprecated
and completing the wizard

Change-Id: I5d367dacb04327107f25e147edc08efc4eb1c2fe
2018-11-22 21:51:31 +00:00
Jonah Graham
a923614c73 Bug 540373: Cleanup: Organize Imports
This was done by selecting all projects in Eclipse then
Source -> Clean Up... -> choosing:
- Organize Imports
and completing the wizard

Change-Id: Ia7b305a4c967d0e6f4e8fb8c1041e7028b24006c
2018-11-22 21:47:02 +00:00
Jonah Graham
170e654b47 Bug 540373: Cleanup: Format & Remove trailing whitespace
This was done by selecting all projects in Eclipse then
Source -> Clean Up... -> choosing:
- Format source code
- Remove trailing white spaces on all lines
and completing the wizard

Change-Id: I63685372c6bcc67719bcf145123bcb72e5b00394
2018-11-22 21:47:02 +00:00
Jonah Graham
35996a5c5c Bug 540373: Standard .settings auto applied
The releng/scripts/apply_jdt_prefs_to_all_projects.sh was run to
copy standard settings to all other projects.

Change-Id: I4436c947d7f0142f56b709e661379c3eb54f666b
2018-11-22 21:47:02 +00:00
Jonah Graham
f70a8b35c1 Bug 540371: Update to EPLv2 using releng/scripts/change_to_eplv2.sh
Change-Id: Ifbb1d5af2a00bd5634dea200320e8c4303ffca6c
2018-11-22 20:31:51 +00:00
Jonah Graham
48d2271a58 Bug 540373: Normalize newlines with .gitattributes
There is also a new script to verify completeness of .gitattributes:
releng/scripts/verify_gitattributes.sh

Change-Id: I2ce270852ab54b66b6c474a6ec94203fe5bba78b
2018-11-20 21:20:39 +00:00
Karsten Thoms
652602febd Bug 540610 - Add Automatic-Module-Name header
Change-Id: Ia990b24469751050dd9ec8f9b5550804816308b3
Signed-off-by: Karsten Thoms <karsten.thoms@itemis.de>
2018-10-30 15:49:15 +01:00