From d0928cc1854ad4f78316682e22976e92bbd93119 Mon Sep 17 00:00:00 2001 From: Andreas Dangel Date: Thu, 4 Jul 2024 11:48:11 +0200 Subject: [PATCH 1/2] [apex] ApexUnitTestShouldNotUseSeeAllDataTrue: case-insensitive check The annotation parameter name "seeAllData" is now compared case-insensitive. Fixes #5095 --- docs/pages/release_notes.md | 2 + .../lang/apex/ast/ASTAnnotationParameter.java | 15 ++++++ ...nitTestShouldNotUseSeeAllDataTrueRule.java | 2 +- ...ApexUnitTestShouldNotUseSeeAllDataTrue.xml | 51 +++++++++++++++++++ 4 files changed, 69 insertions(+), 1 deletion(-) diff --git a/docs/pages/release_notes.md b/docs/pages/release_notes.md index bc1a36ec7a..09668b4201 100644 --- a/docs/pages/release_notes.md +++ b/docs/pages/release_notes.md @@ -15,6 +15,8 @@ This is a {{ site.pmd.release_type }} release. ### ๐Ÿš€ New and noteworthy ### ๐Ÿ› Fixed Issues +* apex-bestpractices + * [#5095](https://github.com/pmd/pmd/issues/5095): \[apex] ApexUnitTestShouldNotUseSeeAllDataTrue false negative due to casing (regression in PMD 7) ### ๐Ÿšจ API Changes diff --git a/pmd-apex/src/main/java/net/sourceforge/pmd/lang/apex/ast/ASTAnnotationParameter.java b/pmd-apex/src/main/java/net/sourceforge/pmd/lang/apex/ast/ASTAnnotationParameter.java index 9b50126c41..3782b2946a 100644 --- a/pmd-apex/src/main/java/net/sourceforge/pmd/lang/apex/ast/ASTAnnotationParameter.java +++ b/pmd-apex/src/main/java/net/sourceforge/pmd/lang/apex/ast/ASTAnnotationParameter.java @@ -4,6 +4,8 @@ package net.sourceforge.pmd.lang.apex.ast; +import org.checkerframework.checker.nullness.qual.NonNull; + import com.google.summit.ast.expression.Expression; import com.google.summit.ast.expression.LiteralExpression; import com.google.summit.ast.modifier.ElementArgument; @@ -50,4 +52,17 @@ public final class ASTAnnotationParameter extends AbstractApexNode.Single + + + [apex] ApexUnitTestShouldNotUseSeeAllDataTrue false negative due to casing (regression in PMD 7) #5095 + 9 + 2,5,10,15,20,25,30,35,40 + + From 68300298ef4d2ec6176d8e4f46f426952ffb36fd Mon Sep 17 00:00:00 2001 From: Andreas Dangel Date: Thu, 4 Jul 2024 12:13:13 +0200 Subject: [PATCH 2/2] Add @gearsethenry as a contributor --- .all-contributorsrc | 9 ++++++ docs/pages/pmd/projectdocs/credits.md | 41 ++++++++++++++------------- 2 files changed, 31 insertions(+), 19 deletions(-) diff --git a/.all-contributorsrc b/.all-contributorsrc index 02a86f1818..5caf81c216 100644 --- a/.all-contributorsrc +++ b/.all-contributorsrc @@ -7645,6 +7645,15 @@ "contributions": [ "bug" ] + }, + { + "login": "gearsethenry", + "name": "gearsethenry", + "avatar_url": "https://avatars.githubusercontent.com/u/127120320?v=4", + "profile": "https://github.com/gearsethenry", + "contributions": [ + "bug" + ] } ], "contributorsPerLine": 7, diff --git a/docs/pages/pmd/projectdocs/credits.md b/docs/pages/pmd/projectdocs/credits.md index 97c0ea98da..4763be2205 100644 --- a/docs/pages/pmd/projectdocs/credits.md +++ b/docs/pages/pmd/projectdocs/credits.md @@ -910,179 +910,182 @@ Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/d frankl
frankl

๐Ÿ› freafrea
freafrea

๐Ÿ› fsapatin
fsapatin

๐Ÿ› + gearsethenry
gearsethenry

๐Ÿ› gracia19
gracia19

๐Ÿ› guo fei
guo fei

๐Ÿ› - gurmsc5
gurmsc5

๐Ÿ› + gurmsc5
gurmsc5

๐Ÿ› gwilymatgearset
gwilymatgearset

๐Ÿ’ป ๐Ÿ› haigsn
haigsn

๐Ÿ› hemanshu070
hemanshu070

๐Ÿ› henrik242
henrik242

๐Ÿ› hongpuwu
hongpuwu

๐Ÿ› hvbtup
hvbtup

๐Ÿ’ป ๐Ÿ› - igniti GmbH
igniti GmbH

๐Ÿ› + igniti GmbH
igniti GmbH

๐Ÿ› ilovezfs
ilovezfs

๐Ÿ› itaigilo
itaigilo

๐Ÿ› jakivey32
jakivey32

๐Ÿ› jbennett2091
jbennett2091

๐Ÿ› jcamerin
jcamerin

๐Ÿ› jkeener1
jkeener1

๐Ÿ› - jmetertea
jmetertea

๐Ÿ› + jmetertea
jmetertea

๐Ÿ› johnra2
johnra2

๐Ÿ’ป johnzhao9
johnzhao9

๐Ÿ› josemanuelrolon
josemanuelrolon

๐Ÿ’ป ๐Ÿ› kabroxiko
kabroxiko

๐Ÿ’ป ๐Ÿ› karwer
karwer

๐Ÿ› kaulonline
kaulonline

๐Ÿ› - kdaemonv
kdaemonv

๐Ÿ› + kdaemonv
kdaemonv

๐Ÿ› kdebski85
kdebski85

๐Ÿ› ๐Ÿ’ป kenji21
kenji21

๐Ÿ’ป ๐Ÿ› kfranic
kfranic

๐Ÿ› khalidkh
khalidkh

๐Ÿ› koalalam
koalalam

๐Ÿ› krzyk
krzyk

๐Ÿ› - lasselindqvist
lasselindqvist

๐Ÿ› + lasselindqvist
lasselindqvist

๐Ÿ› lgemeinhardt
lgemeinhardt

๐Ÿ› lihuaib
lihuaib

๐Ÿ› liqingjun123
liqingjun123

๐Ÿ› lonelyma1021
lonelyma1021

๐Ÿ› lpeddy
lpeddy

๐Ÿ› lujiefsi
lujiefsi

๐Ÿ’ป - lukelukes
lukelukes

๐Ÿ’ป + lukelukes
lukelukes

๐Ÿ’ป lyriccoder
lyriccoder

๐Ÿ› marcelmore
marcelmore

๐Ÿ› matchbox
matchbox

๐Ÿ› matthiaskraaz
matthiaskraaz

๐Ÿ› meandonlyme
meandonlyme

๐Ÿ› mikesive
mikesive

๐Ÿ› - milossesic
milossesic

๐Ÿ› + milossesic
milossesic

๐Ÿ› mluckam
mluckam

๐Ÿ’ป ๐Ÿ› mohan-chinnappan-n
mohan-chinnappan-n

๐Ÿ’ป mriddell95
mriddell95

๐Ÿ› mrlzh
mrlzh

๐Ÿ› msloan
msloan

๐Ÿ› mucharlaravalika
mucharlaravalika

๐Ÿ› - mvenneman
mvenneman

๐Ÿ› + mvenneman
mvenneman

๐Ÿ› nareshl119
nareshl119

๐Ÿ› nicolas-harraudeau-sonarsource
nicolas-harraudeau-sonarsource

๐Ÿ› noerremark
noerremark

๐Ÿ› novsirion
novsirion

๐Ÿ› nwcm
nwcm

๐Ÿ“– ๐Ÿ› ๐Ÿ’ป oggboy
oggboy

๐Ÿ› - oinume
oinume

๐Ÿ› + oinume
oinume

๐Ÿ› orimarko
orimarko

๐Ÿ’ป ๐Ÿ› pablogomez2197
pablogomez2197

๐Ÿ› pacvz
pacvz

๐Ÿ’ป pallavi agarwal
pallavi agarwal

๐Ÿ› parksungrin
parksungrin

๐Ÿ› patpatpat123
patpatpat123

๐Ÿ› - patriksevallius
patriksevallius

๐Ÿ› + patriksevallius
patriksevallius

๐Ÿ› pbrajesh1
pbrajesh1

๐Ÿ› phoenix384
phoenix384

๐Ÿ› piotrszymanski-sc
piotrszymanski-sc

๐Ÿ’ป plan3d
plan3d

๐Ÿ› poojasix
poojasix

๐Ÿ› prabhushrikant
prabhushrikant

๐Ÿ› - pujitha8783
pujitha8783

๐Ÿ› + pujitha8783
pujitha8783

๐Ÿ› r-r-a-j
r-r-a-j

๐Ÿ› raghujayjunk
raghujayjunk

๐Ÿ› rajeshveera
rajeshveera

๐Ÿ› rajeswarreddy88
rajeswarreddy88

๐Ÿ› recdevs
recdevs

๐Ÿ› reudismam
reudismam

๐Ÿ’ป ๐Ÿ› - rijkt
rijkt

๐Ÿ› + rijkt
rijkt

๐Ÿ› rillig-tk
rillig-tk

๐Ÿ› rmohan20
rmohan20

๐Ÿ’ป ๐Ÿ› rnveach
rnveach

๐Ÿ› rxmicro
rxmicro

๐Ÿ› ryan-gustafson
ryan-gustafson

๐Ÿ’ป ๐Ÿ› sabi0
sabi0

๐Ÿ› - scais
scais

๐Ÿ› + scais
scais

๐Ÿ› screamingfrog
screamingfrog

๐Ÿ’ต sebbASF
sebbASF

๐Ÿ› sergeygorbaty
sergeygorbaty

๐Ÿ’ป shilko2013
shilko2013

๐Ÿ› shiomiyan
shiomiyan

๐Ÿ“– simeonKondr
simeonKondr

๐Ÿ› - snajberk
snajberk

๐Ÿ› + snajberk
snajberk

๐Ÿ› sniperrifle2004
sniperrifle2004

๐Ÿ› snuyanzin
snuyanzin

๐Ÿ› ๐Ÿ’ป soyodream
soyodream

๐Ÿ› sratz
sratz

๐Ÿ› stonio
stonio

๐Ÿ› sturton
sturton

๐Ÿ’ป ๐Ÿ› - sudharmohan
sudharmohan

๐Ÿ› + sudharmohan
sudharmohan

๐Ÿ› suruchidawar
suruchidawar

๐Ÿ› svenfinitiv
svenfinitiv

๐Ÿ› szymanp23
szymanp23

๐Ÿ› ๐Ÿ’ป tashiscool
tashiscool

๐Ÿ› test-git-hook
test-git-hook

๐Ÿ› testation21
testation21

๐Ÿ’ป ๐Ÿ› - thanosa
thanosa

๐Ÿ› + thanosa
thanosa

๐Ÿ› tiandiyixian
tiandiyixian

๐Ÿ› tobwoerk
tobwoerk

๐Ÿ› tprouvot
tprouvot

๐Ÿ› ๐Ÿ’ป trentchilders
trentchilders

๐Ÿ› triandicAnt
triandicAnt

๐Ÿ› trishul14
trishul14

๐Ÿ› - tsui
tsui

๐Ÿ› + tsui
tsui

๐Ÿ› wangzitom12306
wangzitom12306

๐Ÿ› winhkey
winhkey

๐Ÿ› witherspore
witherspore

๐Ÿ› wjljack
wjljack

๐Ÿ› wuchiuwong
wuchiuwong

๐Ÿ› xingsong
xingsong

๐Ÿ› - xioayuge
xioayuge

๐Ÿ› + xioayuge
xioayuge

๐Ÿ› xnYi9wRezm
xnYi9wRezm

๐Ÿ’ป ๐Ÿ› xuanuy
xuanuy

๐Ÿ› xyf0921
xyf0921

๐Ÿ› yalechen-cyw3
yalechen-cyw3

๐Ÿ› yasuharu-sato
yasuharu-sato

๐Ÿ› zenglian
zenglian

๐Ÿ› - zgrzyt93
zgrzyt93

๐Ÿ’ป ๐Ÿ› + zgrzyt93
zgrzyt93

๐Ÿ’ป ๐Ÿ› zh3ng
zh3ng

๐Ÿ› zt_soft
zt_soft

๐Ÿ› ztt79
ztt79

๐Ÿ› zzzzfeng
zzzzfeng

๐Ÿ› รrpรกd Magosรกnyi
รrpรกd Magosรกnyi

๐Ÿ› ไปป่ดตๆฐ
ไปป่ดตๆฐ

๐Ÿ› + + ่Œ…ๅปถๅฎ‰
่Œ…ๅปถๅฎ‰

๐Ÿ’ป