Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release 2024.2.3 #2923

Merged
merged 3 commits into from
Oct 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ platformBranch=.2
platformBuild=
pluginVersion=
pluginBranch=
pluginBuild=.2
pluginBuild=.3
useInstaller=false
pycharmVersion=192.4787.5-EAP-SNAPSHOT
clionVersion=192.4787.12-EAP-SNAPSHOT
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ public static boolean file_item(PsiBuilder b, int l) {
return PerlParserGenerated.file_item(b, l);
}

@SuppressWarnings("UnusedReturnValue")
public static boolean block_content(PsiBuilder b, int l) {
return PerlParserGenerated.block_content(b, l);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ public static boolean statementSemi(PsiBuilder b, int l) {
}


protected static boolean isOperatorToken(PsiBuilder b, @SuppressWarnings("unused") int l) {
static boolean isOperatorToken(PsiBuilder b, @SuppressWarnings("unused") int l) {
return PerlTokenSets.OPERATORS_TOKENSET.contains(b.getTokenType());
}

Expand Down Expand Up @@ -367,6 +367,7 @@ public static boolean parseUseParameters(@NotNull PsiBuilder b, int l, @NotNull
/**
* Helper method to pass package [version] in use statement
*/
@SuppressWarnings("UnusedReturnValue")
public static boolean passPackageAndVersion(@NotNull PerlBuilder b, int l) {
assert GeneratedParserUtilBase.consumeTokenFast(b, PACKAGE);
PerlParserGenerated.perl_version(b, l);
Expand Down Expand Up @@ -399,7 +400,7 @@ public static boolean parseNo(@NotNull PsiBuilder b, int l) {
return false;
}

public static boolean parseBareString(@NotNull PsiBuilder b, int l) {
public static boolean parseBareString(@NotNull PsiBuilder b, int ignored) {
IElementType type = b.getTokenType();
if (type != STRING_CONTENT && type != STRING_SPECIAL_ESCAPE_CHAR) {
return false;
Expand Down
4 changes: 4 additions & 0 deletions qodana.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,7 @@ version: "1.0"
linter: jetbrains/qodana-jvm
profile:
path: .idea/inspectionProfiles/Project_Quality.xml
exclude:
- name: All
patterns:
- "**/gen/**"
Comment on lines +5 to +8
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codebase verification

Issue Detected: Exclude Pattern Not Matching Any Files

The exclusion pattern "**/gen/**" in qodana.yaml is not effectively matching and excluding any files. Despite the presence of 17 "gen" directories with numerous files, the current pattern fails to exclude them from linting.

🔗 Analysis chain

LGTM! Verify the impact of the new exclude pattern.

The addition of the exclude section to ignore files matching the pattern "/gen/" is a good practice. This will help reduce noise in linting reports by excluding generated or third-party code.

To ensure this change doesn't unintentionally exclude important files, please run the following script to check which files are being excluded:

Review the output to confirm that only intended files are being excluded.


Action Required: Update the shell script to use the --glob option for pattern matching and rerun it to verify the exclude pattern.


Action Required: Verify the presence of "gen" directories and their contents to ensure the exclude pattern is effective.


Action Required: Update the glob pattern to **/gen/**/* to accurately match all files within "gen" directories and rerun the script to verify the exclude pattern.


Action Required: Refine the glob pattern to gen/**/* and use rg for pattern matching to accurately identify all files within "gen" directories. Rerun the scripts to verify the exclude pattern.

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: List files that match the exclude pattern

echo "Files that will be excluded from linting:"
fd -t f -p "**/gen/**"

echo "Total number of excluded files:"
fd -t f -p "**/gen/**" | wc -l

Length of output: 803


Script:

#!/bin/bash
# Description: List files that match the exclude pattern using glob

echo "Files that will be excluded from linting:"
fd -t f --glob "**/gen/**"

echo "Total number of excluded files:"
fd -t f --glob "**/gen/**" | wc -l

Length of output: 233


Script:

#!/bin/bash
# Description: Find all directories named "gen" and list their contents

echo "Searching for directories named 'gen':"
fd -t d 'gen'

echo "Listing files within each 'gen' directory:"
fd -t d 'gen' | while read -r dir; do
  echo "Files in $dir:"
  fd -t f --glob "**" "$dir"
  echo ""
done

echo "Total number of 'gen' directories found:"
fd -t d 'gen' | wc -l

Length of output: 62186


Script:

#!/bin/bash
# Description: List files that match the exclude pattern using updated glob

echo "Files that will be excluded from linting:"
fd -t f --glob "**/gen/**/*"

echo "Total number of excluded files:"
fd -t f --glob "**/gen/**/*" | wc -l

Length of output: 237


Script:

#!/bin/bash
# Description: List files that match the exclude pattern using refined glob and alternative tool

# Using adjusted glob pattern
echo "Files that will be excluded from linting (using gen/**/*):"
fd -t f --glob "gen/**/*"

echo "Total number of excluded files (using gen/**/*):"
fd -t f --glob "gen/**/*" | wc -l

# Using ripgrep for alternative pattern matching
echo "Files that will be excluded from linting (using rg):"
rg --files --glob "gen/**" 

echo "Total number of excluded files (using rg):"
rg --files --glob "gen/**" | wc -l

Length of output: 577

🧰 Tools
🪛 yamllint

[error] 8-8: no new line character at the end of file

(new-line-at-end-of-file)

Loading