From 5bc2a9e36ff35ff28fac479f569a4429327b4faa Mon Sep 17 00:00:00 2001 From: Nicholas Gates Date: Wed, 28 May 2025 10:26:07 -0400 Subject: [PATCH 01/22] chore: QPPA-10418 code metrics action --- .github/workflows/code-metrics.yml | 85 ++++++++++++++++++++++++++++++ 1 file changed, 85 insertions(+) create mode 100644 .github/workflows/code-metrics.yml diff --git a/.github/workflows/code-metrics.yml b/.github/workflows/code-metrics.yml new file mode 100644 index 000000000..3a2f4daef --- /dev/null +++ b/.github/workflows/code-metrics.yml @@ -0,0 +1,85 @@ +name: Code Metrics + +on: + # manual trigger + workflow_dispatch: + # scheduled trigger: every 2 weeks on Wednesday at 23:59 + schedule: + - cron: '59 23 * * 3/2' + +jobs: + count-lines-and-coverage: + runs-on: ubuntu-latest + + steps: + - name: Set Trigger Environment Variable + run: | + if [ "${{ github.event_name }}" = "workflow_dispatch" ]; then + echo "MANUALLY_TRIGGERED=true" >> $GITHUB_ENV + else + echo "MANUALLY_TRIGGERED=false" >> $GITHUB_ENV + fi + + # notify: Nicholas and Nileena using their Slack IDs + - name: Set Slack users to notify if this is a scheduled run + if: env.MANUALLY_TRIGGERED == 'false' + run: | + echo "SLACK_USERS=<@U017GV0LRAR> <@UKQ250V26>" >> $GITHUB_ENV + + - name: Checkout code + uses: actions/checkout@v4 + + # - name: Set node version + # uses: actions/setup-node@v4 + # with: + # node-version: 20 + # cache: 'npm' + + # - name: Install dependencies + # run: npm ci + # env: + # NPM_TOKEN: ${{ secrets.NPM_TOKEN }} + + - name: Count lines of code + id: linecount + run: | + # Install cloc if not already installed + sudo apt-get update && sudo apt-get install -y cloc + + # Run cloc at the HEAD of the repository and capture both JSON and text output + echo "Running cloc at HEAD..." + # Save text summary to a file + cloc --exclude-dir=node_modules,.git . > cloc_text_output.txt + # Save JSON output to a file + cloc --exclude-dir=node_modules,.git --json . > cloc_output.json + + # Use jq to parse the JSON properly (install if needed) + sudo apt-get install -y jq + TOTAL_LINES=$(jq -r '.SUM.code' cloc_output.json) + + # Format the text summary for Slack - using tr instead of sed for better compatibility + TEXT_SUMMARY=$(cat cloc_text_output.txt | tr '\n' '\\n') + + # Set the environment variables for use in the Slack notification + echo "TOTAL_LINES=$TOTAL_LINES" >> $GITHUB_ENV + echo "CLOC_TEXT_SUMMARY<> $GITHUB_ENV + cat cloc_text_output.txt >> $GITHUB_ENV + echo "EOF" >> $GITHUB_ENV + + echo "Total lines of code: $TOTAL_LINES" + + # Display full cloc summary for debugging and information + echo "Full cloc summary:" + cat cloc_text_output.txt + + - name: Slack notification + if: always() + env: + SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK }} + SLACK_WEBHOOK_TYPE: INCOMING_WEBHOOK + uses: slackapi/slack-github-action@v1 + with: + payload: | + { + "text": "Submissions API Code Metrics\n\nTotal lines in repository: ${{ env.TOTAL_LINES }}\n\nDetailed Code Metrics:\n```\n${{ env.CLOC_TEXT_SUMMARY }}\n```\n\nTest coverage summary:\n ${{ env.COVERAGE_STATEMENTS }}\n ${{ env.COVERAGE_BRANCHES }}\n ${{ env.COVERAGE_FUNCTIONS }}\n ${{ env.COVERAGE_LINES }}\n${{ env.SLACK_USERS }}" + } From e109119d3163dd50325804cc9a68ca602ea4e4b2 Mon Sep 17 00:00:00 2001 From: Nicholas Gates Date: Wed, 28 May 2025 13:47:29 -0400 Subject: [PATCH 02/22] chore: QPPA-10418 code metrics action p.2 --- .github/workflows/code-metrics.yml | 15 +++------------ 1 file changed, 3 insertions(+), 12 deletions(-) diff --git a/.github/workflows/code-metrics.yml b/.github/workflows/code-metrics.yml index 3a2f4daef..bccc55a32 100644 --- a/.github/workflows/code-metrics.yml +++ b/.github/workflows/code-metrics.yml @@ -29,17 +29,6 @@ jobs: - name: Checkout code uses: actions/checkout@v4 - # - name: Set node version - # uses: actions/setup-node@v4 - # with: - # node-version: 20 - # cache: 'npm' - - # - name: Install dependencies - # run: npm ci - # env: - # NPM_TOKEN: ${{ secrets.NPM_TOKEN }} - - name: Count lines of code id: linecount run: | @@ -75,7 +64,7 @@ jobs: - name: Slack notification if: always() env: - SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK }} + SLACK_WEBHOOK_URL: ${{ secrets.SLACK_QPPSF_ALERTS_WEBHOOK }} SLACK_WEBHOOK_TYPE: INCOMING_WEBHOOK uses: slackapi/slack-github-action@v1 with: @@ -83,3 +72,5 @@ jobs: { "text": "Submissions API Code Metrics\n\nTotal lines in repository: ${{ env.TOTAL_LINES }}\n\nDetailed Code Metrics:\n```\n${{ env.CLOC_TEXT_SUMMARY }}\n```\n\nTest coverage summary:\n ${{ env.COVERAGE_STATEMENTS }}\n ${{ env.COVERAGE_BRANCHES }}\n ${{ env.COVERAGE_FUNCTIONS }}\n ${{ env.COVERAGE_LINES }}\n${{ env.SLACK_USERS }}" } + # Continue even if Slack notification fails + continue-on-error: true From 3e5dbf5c0e6b7c1a884192688fe6837b9af3785f Mon Sep 17 00:00:00 2001 From: Nicholas Gates Date: Wed, 28 May 2025 14:31:59 -0400 Subject: [PATCH 03/22] chore: QPPA-10418 code metrics action p.3 --- .github/workflows/code-metrics.yml | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) diff --git a/.github/workflows/code-metrics.yml b/.github/workflows/code-metrics.yml index bccc55a32..a4316d6ab 100644 --- a/.github/workflows/code-metrics.yml +++ b/.github/workflows/code-metrics.yml @@ -46,13 +46,25 @@ jobs: sudo apt-get install -y jq TOTAL_LINES=$(jq -r '.SUM.code' cloc_output.json) - # Format the text summary for Slack - using tr instead of sed for better compatibility - TEXT_SUMMARY=$(cat cloc_text_output.txt | tr '\n' '\\n') + # Extract just the summary table for Slack + # Get lines starting from the table header to end of table + sed -n '/^-*$/,/^-*$/p' cloc_text_output.txt > cloc_table.txt # Set the environment variables for use in the Slack notification echo "TOTAL_LINES=$TOTAL_LINES" >> $GITHUB_ENV - echo "CLOC_TEXT_SUMMARY<> $GITHUB_ENV - cat cloc_text_output.txt >> $GITHUB_ENV + + # Create a simplified summary for Slack + { + echo "Code metrics summary:" + echo "Total lines of code: $TOTAL_LINES" + echo "" + echo "Language breakdown:" + cat cloc_table.txt + } > cloc_summary.txt + + # Set as multiline environment variable + echo "CLOC_SUMMARY<> $GITHUB_ENV + cat cloc_summary.txt >> $GITHUB_ENV echo "EOF" >> $GITHUB_ENV echo "Total lines of code: $TOTAL_LINES" From 9ecbfd4da23d8a408939afb5b3b432da59241a36 Mon Sep 17 00:00:00 2001 From: Nicholas Gates Date: Wed, 28 May 2025 14:45:52 -0400 Subject: [PATCH 04/22] chore: QPPA-10418 code metrics action p.4 --- .github/workflows/code-metrics.yml | 24 +++++++----------------- 1 file changed, 7 insertions(+), 17 deletions(-) diff --git a/.github/workflows/code-metrics.yml b/.github/workflows/code-metrics.yml index a4316d6ab..5bc35eb9a 100644 --- a/.github/workflows/code-metrics.yml +++ b/.github/workflows/code-metrics.yml @@ -46,25 +46,15 @@ jobs: sudo apt-get install -y jq TOTAL_LINES=$(jq -r '.SUM.code' cloc_output.json) - # Extract just the summary table for Slack - # Get lines starting from the table header to end of table - sed -n '/^-*$/,/^-*$/p' cloc_text_output.txt > cloc_table.txt - - # Set the environment variables for use in the Slack notification + # Set the total lines environment variable echo "TOTAL_LINES=$TOTAL_LINES" >> $GITHUB_ENV - # Create a simplified summary for Slack - { - echo "Code metrics summary:" - echo "Total lines of code: $TOTAL_LINES" - echo "" - echo "Language breakdown:" - cat cloc_table.txt - } > cloc_summary.txt - - # Set as multiline environment variable + # Create and set the cloc summary as a multiline environment variable echo "CLOC_SUMMARY<> $GITHUB_ENV - cat cloc_summary.txt >> $GITHUB_ENV + head -n 1 cloc_text_output.txt >> $GITHUB_ENV # Version and timing info + echo "" >> $GITHUB_ENV + echo "Language breakdown:" >> $GITHUB_ENV + sed -n '/^-*$/,/^-*$/p' cloc_text_output.txt >> $GITHUB_ENV # Table with header, content, and footer echo "EOF" >> $GITHUB_ENV echo "Total lines of code: $TOTAL_LINES" @@ -82,7 +72,7 @@ jobs: with: payload: | { - "text": "Submissions API Code Metrics\n\nTotal lines in repository: ${{ env.TOTAL_LINES }}\n\nDetailed Code Metrics:\n```\n${{ env.CLOC_TEXT_SUMMARY }}\n```\n\nTest coverage summary:\n ${{ env.COVERAGE_STATEMENTS }}\n ${{ env.COVERAGE_BRANCHES }}\n ${{ env.COVERAGE_FUNCTIONS }}\n ${{ env.COVERAGE_LINES }}\n${{ env.SLACK_USERS }}" + "text": "Conversion Tool Code Metrics\n\nDetailed Code Metrics:\n```\n${{ env.CLOC_SUMMARY }}\n```\n${{ env.SLACK_USERS }}" } # Continue even if Slack notification fails continue-on-error: true From 96571661d2635beda549d79f278143c6b9ee1401 Mon Sep 17 00:00:00 2001 From: Nicholas Gates Date: Wed, 28 May 2025 15:00:52 -0400 Subject: [PATCH 05/22] chore: QPPA-10418 code metrics action p.4 --- .github/workflows/code-metrics.yml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/workflows/code-metrics.yml b/.github/workflows/code-metrics.yml index 5bc35eb9a..7bec64445 100644 --- a/.github/workflows/code-metrics.yml +++ b/.github/workflows/code-metrics.yml @@ -65,6 +65,8 @@ jobs: - name: Slack notification if: always() + # Continue even if Slack notification fails + continue-on-error: true env: SLACK_WEBHOOK_URL: ${{ secrets.SLACK_QPPSF_ALERTS_WEBHOOK }} SLACK_WEBHOOK_TYPE: INCOMING_WEBHOOK @@ -72,7 +74,6 @@ jobs: with: payload: | { - "text": "Conversion Tool Code Metrics\n\nDetailed Code Metrics:\n```\n${{ env.CLOC_SUMMARY }}\n```\n${{ env.SLACK_USERS }}" + "text": "Conversion Tool Code Metrics\n\nDetailed Code Metrics:\n```\n${{ env.CLOC_SUMMARY | replace('\n', '\\n') }}\n```\n${{ env.SLACK_USERS }}" } - # Continue even if Slack notification fails - continue-on-error: true + From 0420ce5b16462f56fcf01f2a010147f93a00c764 Mon Sep 17 00:00:00 2001 From: Nicholas Gates Date: Wed, 28 May 2025 15:06:06 -0400 Subject: [PATCH 06/22] chore: QPPA-10418 code metrics action p.6 --- .github/workflows/code-metrics.yml | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/.github/workflows/code-metrics.yml b/.github/workflows/code-metrics.yml index 7bec64445..bcc47fd24 100644 --- a/.github/workflows/code-metrics.yml +++ b/.github/workflows/code-metrics.yml @@ -63,10 +63,13 @@ jobs: echo "Full cloc summary:" cat cloc_text_output.txt + - name: Preprocess CLOC Summary + run: | + # Escape newlines in CLOC_SUMMARY for Slack payload + echo "ESCAPED_CLOC_SUMMARY=$(echo \"${{ env.CLOC_SUMMARY }}\" | sed ':a;N;$!ba;s/\n/\\n/g')" >> $GITHUB_ENV + - name: Slack notification if: always() - # Continue even if Slack notification fails - continue-on-error: true env: SLACK_WEBHOOK_URL: ${{ secrets.SLACK_QPPSF_ALERTS_WEBHOOK }} SLACK_WEBHOOK_TYPE: INCOMING_WEBHOOK @@ -74,6 +77,8 @@ jobs: with: payload: | { - "text": "Conversion Tool Code Metrics\n\nDetailed Code Metrics:\n```\n${{ env.CLOC_SUMMARY | replace('\n', '\\n') }}\n```\n${{ env.SLACK_USERS }}" + "text": "Conversion Tool Code Metrics\n\nDetailed Code Metrics:\n```\n${{ env.ESCAPED_CLOC_SUMMARY }}\n```\n${{ env.SLACK_USERS }}" } + # Continue even if Slack notification fails + continue-on-error: true From 99c228f05c36261e6ffcafeabfd70230187e6026 Mon Sep 17 00:00:00 2001 From: Nicholas Gates Date: Wed, 28 May 2025 15:16:00 -0400 Subject: [PATCH 07/22] chore: QPPA-10418 code metrics action p.7 --- .github/workflows/code-metrics.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/code-metrics.yml b/.github/workflows/code-metrics.yml index bcc47fd24..9c0a82b9c 100644 --- a/.github/workflows/code-metrics.yml +++ b/.github/workflows/code-metrics.yml @@ -65,8 +65,8 @@ jobs: - name: Preprocess CLOC Summary run: | - # Escape newlines in CLOC_SUMMARY for Slack payload - echo "ESCAPED_CLOC_SUMMARY=$(echo \"${{ env.CLOC_SUMMARY }}\" | sed ':a;N;$!ba;s/\n/\\n/g')" >> $GITHUB_ENV + # Use jq to properly escape the summary for JSON + echo "ESCAPED_CLOC_SUMMARY=$(echo "$CLOC_SUMMARY" | jq -aRs .)" >> $GITHUB_ENV - name: Slack notification if: always() @@ -77,7 +77,7 @@ jobs: with: payload: | { - "text": "Conversion Tool Code Metrics\n\nDetailed Code Metrics:\n```\n${{ env.ESCAPED_CLOC_SUMMARY }}\n```\n${{ env.SLACK_USERS }}" + "text": "Conversion Tool Code Metrics\n\nDetailed Code Metrics:\n```\n${{ env.CLOC_SUMMARY }}\n```\n${{ env.SLACK_USERS }}" } # Continue even if Slack notification fails continue-on-error: true From 492546452cd48a218d13c7832cdc1050b38d45ac Mon Sep 17 00:00:00 2001 From: Nicholas Gates Date: Thu, 29 May 2025 09:42:30 -0400 Subject: [PATCH 08/22] chore: QPPA-10418 code metrics action p.8 --- .github/workflows/code-metrics.yml | 159 +++++++++++++++++++++++------ 1 file changed, 127 insertions(+), 32 deletions(-) diff --git a/.github/workflows/code-metrics.yml b/.github/workflows/code-metrics.yml index 9c0a82b9c..f5a449a0f 100644 --- a/.github/workflows/code-metrics.yml +++ b/.github/workflows/code-metrics.yml @@ -35,50 +35,145 @@ jobs: # Install cloc if not already installed sudo apt-get update && sudo apt-get install -y cloc - # Run cloc at the HEAD of the repository and capture both JSON and text output + # Run cloc at the HEAD of the repository and capture JSON output echo "Running cloc at HEAD..." - # Save text summary to a file - cloc --exclude-dir=node_modules,.git . > cloc_text_output.txt - # Save JSON output to a file cloc --exclude-dir=node_modules,.git --json . > cloc_output.json - # Use jq to parse the JSON properly (install if needed) + # Install jq if not already installed sudo apt-get install -y jq - TOTAL_LINES=$(jq -r '.SUM.code' cloc_output.json) - # Set the total lines environment variable + # Get total lines of code + TOTAL_LINES=$(jq -r '.SUM.code' cloc_output.json) echo "TOTAL_LINES=$TOTAL_LINES" >> $GITHUB_ENV - # Create and set the cloc summary as a multiline environment variable - echo "CLOC_SUMMARY<> $GITHUB_ENV - head -n 1 cloc_text_output.txt >> $GITHUB_ENV # Version and timing info - echo "" >> $GITHUB_ENV - echo "Language breakdown:" >> $GITHUB_ENV - sed -n '/^-*$/,/^-*$/p' cloc_text_output.txt >> $GITHUB_ENV # Table with header, content, and footer + # Transform the JSON to the subset format for Slack + cat < transform.jq + { + "header": { + "number of files": .SUM.nFiles, + "number of lines": (.SUM.blank + .SUM.comment + .SUM.code) + }, + "XML": { + "number of Files": .XML.nFiles, + "code": .XML.code + }, + "JSON": { + "number of Files": .JSON.nFiles, + "code": .JSON.code + }, + "Java": { + "number of Files": .Java.nFiles, + "code": .Java.code + }, + "Maven": { + "number of Files": .Maven.nFiles, + "code": .Maven.code + }, + "YAML": { + "number of Files": .YAML.nFiles, + "code": .YAML.code + }, + "Markdown": { + "number of Files": .Markdown.nFiles, + "code": .Markdown.code + }, + "Cucumber": { + "number of Files": .Cucumber.nFiles, + "code": .Cucumber.code + }, + "Bourne Shell": { + "number of Files": ."Bourne Shell".nFiles, + "code": ."Bourne Shell".code + }, + "Python": { + "number of Files": .Python.nFiles, + "code": .Python.code + }, + "TOML": { + "number of Files": .TOML.nFiles, + "code": .TOML.code + }, + "Dockerfile": { + "number of Files": .Dockerfile.nFiles, + "code": .Dockerfile.code + }, + "Text": { + "number of Files": .Text.nFiles, + "code": .Text.code + }, + "Properties": { + "number of Files": .Properties.nFiles, + "code": .Properties.code + }, + "DOS Batch": { + "number of Files": ."DOS Batch".nFiles, + "code": ."DOS Batch".code + }, + "SUM": { + "blank": .SUM.blank, + "number of Files": .SUM.nFiles + } + } + EOF + + # Apply the transformation + jq -f transform.jq cloc_output.json > cloc_subset.json + + # Create a more readable format for the Slack message + echo "CLOC_JSON<> $GITHUB_ENV + cat cloc_subset.json >> $GITHUB_ENV echo "EOF" >> $GITHUB_ENV echo "Total lines of code: $TOTAL_LINES" # Display full cloc summary for debugging and information - echo "Full cloc summary:" - cat cloc_text_output.txt + echo "Full cloc JSON summary:" + cat cloc_output.json - - name: Preprocess CLOC Summary - run: | - # Use jq to properly escape the summary for JSON - echo "ESCAPED_CLOC_SUMMARY=$(echo "$CLOC_SUMMARY" | jq -aRs .)" >> $GITHUB_ENV + echo "Subset cloc JSON summary:" + cat cloc_subset.json - - name: Slack notification - if: always() - env: - SLACK_WEBHOOK_URL: ${{ secrets.SLACK_QPPSF_ALERTS_WEBHOOK }} - SLACK_WEBHOOK_TYPE: INCOMING_WEBHOOK - uses: slackapi/slack-github-action@v1 - with: - payload: | - { - "text": "Conversion Tool Code Metrics\n\nDetailed Code Metrics:\n```\n${{ env.CLOC_SUMMARY }}\n```\n${{ env.SLACK_USERS }}" - } - # Continue even if Slack notification fails - continue-on-error: true + # - name: Slack notification + # if: always() + # env: + # SLACK_WEBHOOK_URL: ${{ secrets.SLACK_QPPSF_ALERTS_WEBHOOK }} + # SLACK_WEBHOOK_TYPE: INCOMING_WEBHOOK + # uses: slackapi/slack-github-action@v1 + # with: + # payload: | + # { + # "text": "Conversion Tool Code Metrics", + # "blocks": [ + # { + # "type": "section", + # "text": { + # "type": "mrkdwn", + # "text": "*Conversion Tool Code Metrics*" + # } + # }, + # { + # "type": "section", + # "text": { + # "type": "mrkdwn", + # "text": "Total lines of code: ${{ env.TOTAL_LINES }}" + # } + # }, + # { + # "type": "section", + # "text": { + # "type": "mrkdwn", + # "text": "```${{ env.CLOC_JSON }}```" + # } + # }, + # { + # "type": "section", + # "text": { + # "type": "mrkdwn", + # "text": "${{ env.SLACK_USERS }}" + # } + # } + # ] + # } + # # Continue even if Slack notification fails + # continue-on-error: true From ba2e244e841163df58e12a76ad31ba9c30bf6619 Mon Sep 17 00:00:00 2001 From: Nicholas Gates Date: Thu, 29 May 2025 10:01:39 -0400 Subject: [PATCH 09/22] chore: QPPA-10418 code metrics action p.9 --- .github/workflows/code-metrics.yml | 86 +++++++++++++++--------------- 1 file changed, 43 insertions(+), 43 deletions(-) diff --git a/.github/workflows/code-metrics.yml b/.github/workflows/code-metrics.yml index f5a449a0f..e7788d8b7 100644 --- a/.github/workflows/code-metrics.yml +++ b/.github/workflows/code-metrics.yml @@ -133,47 +133,47 @@ jobs: echo "Subset cloc JSON summary:" cat cloc_subset.json - # - name: Slack notification - # if: always() - # env: - # SLACK_WEBHOOK_URL: ${{ secrets.SLACK_QPPSF_ALERTS_WEBHOOK }} - # SLACK_WEBHOOK_TYPE: INCOMING_WEBHOOK - # uses: slackapi/slack-github-action@v1 - # with: - # payload: | - # { - # "text": "Conversion Tool Code Metrics", - # "blocks": [ - # { - # "type": "section", - # "text": { - # "type": "mrkdwn", - # "text": "*Conversion Tool Code Metrics*" - # } - # }, - # { - # "type": "section", - # "text": { - # "type": "mrkdwn", - # "text": "Total lines of code: ${{ env.TOTAL_LINES }}" - # } - # }, - # { - # "type": "section", - # "text": { - # "type": "mrkdwn", - # "text": "```${{ env.CLOC_JSON }}```" - # } - # }, - # { - # "type": "section", - # "text": { - # "type": "mrkdwn", - # "text": "${{ env.SLACK_USERS }}" - # } - # } - # ] - # } - # # Continue even if Slack notification fails - # continue-on-error: true + - name: Slack notification + if: always() + env: + SLACK_WEBHOOK_URL: ${{ secrets.SLACK_QPPSF_ALERTS_WEBHOOK }} + SLACK_WEBHOOK_TYPE: INCOMING_WEBHOOK + uses: slackapi/slack-github-action@v1 + with: + payload: | + { + "text": "Conversion Tool Code Metrics", + "blocks": [ + { + "type": "section", + "text": { + "type": "mrkdwn", + "text": "*Conversion Tool Code Metrics*" + } + }, + { + "type": "section", + "text": { + "type": "mrkdwn", + "text": "Total lines of code: ${{ env.TOTAL_LINES }}" + } + }, + { + "type": "section", + "text": { + "type": "mrkdwn", + "text": "```${{ env.CLOC_JSON }}```" + } + }, + { + "type": "section", + "text": { + "type": "mrkdwn", + "text": "${{ env.SLACK_USERS }}" + } + } + ] + } + # Continue even if Slack notification fails + continue-on-error: true From 26834ba1048036a16d97acd4d0b50e7ef1e3afe4 Mon Sep 17 00:00:00 2001 From: Nicholas Gates Date: Thu, 29 May 2025 10:32:50 -0400 Subject: [PATCH 10/22] chore: QPPA-10418 code metrics action p.10 --- .github/workflows/code-metrics.yml | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/.github/workflows/code-metrics.yml b/.github/workflows/code-metrics.yml index e7788d8b7..037639168 100644 --- a/.github/workflows/code-metrics.yml +++ b/.github/workflows/code-metrics.yml @@ -133,6 +133,23 @@ jobs: echo "Subset cloc JSON summary:" cat cloc_subset.json + - name: Format cloc data for Slack + run: | + # Format the cloc JSON data for better display in Slack + echo "CLOC_FORMATTED<> $GITHUB_ENV + jq -r ' + "Total files: \(.header."number of files")\n" + + "Total lines: \(.header."number of lines")\n\n" + + "Language breakdown:\n" + + (to_entries | + sort_by(-(.value.code // 0)) | + map(select(.key != "header" and .key != "SUM")) | + map("• \(.key): \(.value.code // 0) lines in \(.value."number of Files" // 0) files") | + join("\n") + ) + ' cloc_subset.json >> $GITHUB_ENV + echo "EOF" >> $GITHUB_ENV + - name: Slack notification if: always() env: @@ -162,7 +179,7 @@ jobs: "type": "section", "text": { "type": "mrkdwn", - "text": "```${{ env.CLOC_JSON }}```" + "text": "```\n${{ env.CLOC_FORMATTED }}\n```" } }, { From 99a34125d5498a101b8d35dcc39814dd14aa3185 Mon Sep 17 00:00:00 2001 From: Nicholas Gates Date: Thu, 29 May 2025 10:44:25 -0400 Subject: [PATCH 11/22] chore: QPPA-10418 code metrics action p.11 --- .github/workflows/code-metrics.yml | 32 +----------------------------- 1 file changed, 1 insertion(+), 31 deletions(-) diff --git a/.github/workflows/code-metrics.yml b/.github/workflows/code-metrics.yml index 037639168..994db3572 100644 --- a/.github/workflows/code-metrics.yml +++ b/.github/workflows/code-metrics.yml @@ -159,37 +159,7 @@ jobs: with: payload: | { - "text": "Conversion Tool Code Metrics", - "blocks": [ - { - "type": "section", - "text": { - "type": "mrkdwn", - "text": "*Conversion Tool Code Metrics*" - } - }, - { - "type": "section", - "text": { - "type": "mrkdwn", - "text": "Total lines of code: ${{ env.TOTAL_LINES }}" - } - }, - { - "type": "section", - "text": { - "type": "mrkdwn", - "text": "```\n${{ env.CLOC_FORMATTED }}\n```" - } - }, - { - "type": "section", - "text": { - "type": "mrkdwn", - "text": "${{ env.SLACK_USERS }}" - } - } - ] + "text": "*Conversion Tool Code Metrics*\n\nTotal lines of code: ${{ env.TOTAL_LINES }}\n\n```\n${{ env.CLOC_FORMATTED }}\n```\n${{ env.SLACK_USERS }}" } # Continue even if Slack notification fails continue-on-error: true From e946d2e8a5f375507ef041233a21056e98af004d Mon Sep 17 00:00:00 2001 From: Nicholas Gates Date: Thu, 29 May 2025 13:53:18 -0400 Subject: [PATCH 12/22] chore: QPPA-10418 code metrics action p.12 --- .github/workflows/code-metrics.yml | 28 +++++++++++++--------------- 1 file changed, 13 insertions(+), 15 deletions(-) diff --git a/.github/workflows/code-metrics.yml b/.github/workflows/code-metrics.yml index 994db3572..76b0fba62 100644 --- a/.github/workflows/code-metrics.yml +++ b/.github/workflows/code-metrics.yml @@ -135,20 +135,18 @@ jobs: - name: Format cloc data for Slack run: | - # Format the cloc JSON data for better display in Slack - echo "CLOC_FORMATTED<> $GITHUB_ENV - jq -r ' - "Total files: \(.header."number of files")\n" + - "Total lines: \(.header."number of lines")\n\n" + - "Language breakdown:\n" + - (to_entries | - sort_by(-(.value.code // 0)) | - map(select(.key != "header" and .key != "SUM")) | - map("• \(.key): \(.value.code // 0) lines in \(.value."number of Files" // 0) files") | - join("\n") - ) - ' cloc_subset.json >> $GITHUB_ENV - echo "EOF" >> $GITHUB_ENV + # Create a text summary first + cat > cloc_summary.txt << EOF + Total files: $(jq -r '.header."number of files"' cloc_subset.json) + Total lines: $(jq -r '.header."number of lines"' cloc_subset.json) + + Language breakdown: + $(jq -r 'to_entries | sort_by(-(.value.code // 0)) | map(select(.key != "header" and .key != "SUM")) | map("• \(.key): \(.value.code // 0) lines in \(.value."number of Files" // 0) files") | join("\n")' cloc_subset.json) + EOF + + # Use jq to properly escape the entire content for JSON + ESCAPED_SUMMARY=$(cat cloc_summary.txt | jq -Rs .) + echo "CLOC_FORMATTED=${ESCAPED_SUMMARY}" >> $GITHUB_ENV - name: Slack notification if: always() @@ -159,7 +157,7 @@ jobs: with: payload: | { - "text": "*Conversion Tool Code Metrics*\n\nTotal lines of code: ${{ env.TOTAL_LINES }}\n\n```\n${{ env.CLOC_FORMATTED }}\n```\n${{ env.SLACK_USERS }}" + "text": "*Conversion Tool Code Metrics*\n\nTotal lines of code: ${{ env.TOTAL_LINES }}\n\n```${{ env.CLOC_FORMATTED }}```${{ env.SLACK_USERS }}" } # Continue even if Slack notification fails continue-on-error: true From f505fb6feced5e4761ff24f6ee7df3a54d69cc4f Mon Sep 17 00:00:00 2001 From: Nicholas Gates Date: Thu, 29 May 2025 13:58:19 -0400 Subject: [PATCH 13/22] chore: QPPA-10418 code metrics action p.13 --- .github/workflows/code-metrics.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/code-metrics.yml b/.github/workflows/code-metrics.yml index 76b0fba62..67cad47fd 100644 --- a/.github/workflows/code-metrics.yml +++ b/.github/workflows/code-metrics.yml @@ -107,7 +107,7 @@ jobs: }, "DOS Batch": { "number of Files": ."DOS Batch".nFiles, - "code": ."DOS Batch".code + "code": ." }, "SUM": { "blank": .SUM.blank, @@ -157,7 +157,7 @@ jobs: with: payload: | { - "text": "*Conversion Tool Code Metrics*\n\nTotal lines of code: ${{ env.TOTAL_LINES }}\n\n```${{ env.CLOC_FORMATTED }}```${{ env.SLACK_USERS }}" + "text": "*Conversion Tool Code Metrics*\n\nTotal lines of code: ${{ env.TOTAL_LINES }}\n\n```${{ fromJson(env.CLOC_FORMATTED) }}```${{ env.SLACK_USERS }}" } # Continue even if Slack notification fails continue-on-error: true From 6eb343d41f0283416dfa6b3ebe6d3817c003e525 Mon Sep 17 00:00:00 2001 From: Nicholas Gates Date: Thu, 29 May 2025 14:34:27 -0400 Subject: [PATCH 14/22] chore: QPPA-10418 code metrics action p.14 --- .github/workflows/code-metrics.yml | 4 ---- 1 file changed, 4 deletions(-) diff --git a/.github/workflows/code-metrics.yml b/.github/workflows/code-metrics.yml index 67cad47fd..6ce8d40eb 100644 --- a/.github/workflows/code-metrics.yml +++ b/.github/workflows/code-metrics.yml @@ -105,10 +105,6 @@ jobs: "number of Files": .Properties.nFiles, "code": .Properties.code }, - "DOS Batch": { - "number of Files": ."DOS Batch".nFiles, - "code": ." - }, "SUM": { "blank": .SUM.blank, "number of Files": .SUM.nFiles From f0aee3dd1369a4e1d0e6d3db5dfbed38fd3da10c Mon Sep 17 00:00:00 2001 From: Nicholas Gates Date: Thu, 29 May 2025 14:47:56 -0400 Subject: [PATCH 15/22] chore: QPPA-10418 code metrics action p.15 --- .github/workflows/code-metrics.yml | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/.github/workflows/code-metrics.yml b/.github/workflows/code-metrics.yml index 6ce8d40eb..9fcac18d4 100644 --- a/.github/workflows/code-metrics.yml +++ b/.github/workflows/code-metrics.yml @@ -131,18 +131,18 @@ jobs: - name: Format cloc data for Slack run: | - # Create a text summary first - cat > cloc_summary.txt << EOF - Total files: $(jq -r '.header."number of files"' cloc_subset.json) - Total lines: $(jq -r '.header."number of lines"' cloc_subset.json) - - Language breakdown: - $(jq -r 'to_entries | sort_by(-(.value.code // 0)) | map(select(.key != "header" and .key != "SUM")) | map("• \(.key): \(.value.code // 0) lines in \(.value."number of Files" // 0) files") | join("\n")' cloc_subset.json) - EOF - - # Use jq to properly escape the entire content for JSON - ESCAPED_SUMMARY=$(cat cloc_summary.txt | jq -Rs .) - echo "CLOC_FORMATTED=${ESCAPED_SUMMARY}" >> $GITHUB_ENV + # Create a JSON object with the formatted message + # Using jq to construct the entire message as a single JSON string + JSON_PAYLOAD=$(jq -n --arg files "$(jq -r '.header."number of files"' cloc_subset.json)" \ + --arg lines "$(jq -r '.header."number of lines"' cloc_subset.json)" \ + --arg breakdown "$(jq -r 'to_entries | sort_by(-(.value.code // 0)) | + map(select(.key != "header" and .key != "SUM")) | + map("• \(.key): \(.value.code // 0) lines in \(.value."number of Files" // 0) files") | + join("\\n")' cloc_subset.json)" \ + '{"text": "*Code Metrics Summary*\nTotal files: \($files)\nTotal lines: \($lines)\n\n*Language breakdown:*\n\($breakdown)"}') + + # Set the environment variable with the properly formatted JSON + echo "CLOC_FORMATTED=${JSON_PAYLOAD}" >> $GITHUB_ENV - name: Slack notification if: always() From 2ec7082078aefc526cd3835466ecb97867ceb90e Mon Sep 17 00:00:00 2001 From: Nicholas Gates Date: Thu, 29 May 2025 14:54:56 -0400 Subject: [PATCH 16/22] chore: QPPA-10418 code metrics action p.16 --- .github/workflows/code-metrics.yml | 25 ++++++++++++++----------- 1 file changed, 14 insertions(+), 11 deletions(-) diff --git a/.github/workflows/code-metrics.yml b/.github/workflows/code-metrics.yml index 9fcac18d4..c2ff3d665 100644 --- a/.github/workflows/code-metrics.yml +++ b/.github/workflows/code-metrics.yml @@ -131,18 +131,21 @@ jobs: - name: Format cloc data for Slack run: | - # Create a JSON object with the formatted message - # Using jq to construct the entire message as a single JSON string - JSON_PAYLOAD=$(jq -n --arg files "$(jq -r '.header."number of files"' cloc_subset.json)" \ - --arg lines "$(jq -r '.header."number of lines"' cloc_subset.json)" \ - --arg breakdown "$(jq -r 'to_entries | sort_by(-(.value.code // 0)) | - map(select(.key != "header" and .key != "SUM")) | - map("• \(.key): \(.value.code // 0) lines in \(.value."number of Files" // 0) files") | - join("\\n")' cloc_subset.json)" \ - '{"text": "*Code Metrics Summary*\nTotal files: \($files)\nTotal lines: \($lines)\n\n*Language breakdown:*\n\($breakdown)"}') + # Get the values we need + FILES=$(jq -r '.header."number of files"' cloc_subset.json) + LINES=$(jq -r '.header."number of lines"' cloc_subset.json) - # Set the environment variable with the properly formatted JSON - echo "CLOC_FORMATTED=${JSON_PAYLOAD}" >> $GITHUB_ENV + # Create the breakdown text + BREAKDOWN=$(jq -r 'to_entries | sort_by(-(.value.code // 0)) | + map(select(.key != "header" and .key != "SUM")) | + map("• \(.key): \(.value.code // 0) lines in \(.value."number of Files" // 0) files") | + join("\\n")' cloc_subset.json) + + # Create the message with proper escaping for JSON + MESSAGE="*Code Metrics Summary*\\nTotal files: $FILES\\nTotal lines: $LINES\\n\\n*Language breakdown:*\\n$BREAKDOWN" + + # Create the JSON payload + echo "CLOC_FORMATTED={\"text\":\"$MESSAGE\"}" >> $GITHUB_ENV - name: Slack notification if: always() From f528b7d852b3fd7a0aebe95c6c9e299fe5b66f09 Mon Sep 17 00:00:00 2001 From: Nicholas Gates Date: Thu, 29 May 2025 15:01:09 -0400 Subject: [PATCH 17/22] chore: QPPA-10418 code metrics action p.17 --- .github/workflows/code-metrics.yml | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/.github/workflows/code-metrics.yml b/.github/workflows/code-metrics.yml index c2ff3d665..5dbeded6c 100644 --- a/.github/workflows/code-metrics.yml +++ b/.github/workflows/code-metrics.yml @@ -141,11 +141,8 @@ jobs: map("• \(.key): \(.value.code // 0) lines in \(.value."number of Files" // 0) files") | join("\\n")' cloc_subset.json) - # Create the message with proper escaping for JSON - MESSAGE="*Code Metrics Summary*\\nTotal files: $FILES\\nTotal lines: $LINES\\n\\n*Language breakdown:*\\n$BREAKDOWN" - - # Create the JSON payload - echo "CLOC_FORMATTED={\"text\":\"$MESSAGE\"}" >> $GITHUB_ENV + # Create the complete message + echo "CODE_METRICS_SUMMARY=*Code Metrics Summary*\\nTotal files: $FILES\\nTotal lines: $LINES\\n\\n*Language breakdown:*\\n$BREAKDOWN" >> $GITHUB_ENV - name: Slack notification if: always() @@ -156,7 +153,7 @@ jobs: with: payload: | { - "text": "*Conversion Tool Code Metrics*\n\nTotal lines of code: ${{ env.TOTAL_LINES }}\n\n```${{ fromJson(env.CLOC_FORMATTED) }}```${{ env.SLACK_USERS }}" + "text": "*Conversion Tool Code Metrics*\n\n${{ env.CODE_METRICS_SUMMARY }}\n\nTotal lines of code: ${{ env.TOTAL_LINES }}\n${{ env.SLACK_USERS }}" } # Continue even if Slack notification fails continue-on-error: true From 1ec70a0771bda492158a33f2803591955ab64ea4 Mon Sep 17 00:00:00 2001 From: Chetan Munegowda Date: Mon, 2 Jun 2025 14:30:41 -0400 Subject: [PATCH 18/22] QPPA-10370: add sonarqube yml file --- .github/workflows/sonarqube.yml | 46 +++++++++++++++++++++++++++++++++ sonar-project.properties | 32 +++++++++++++++++++++++ 2 files changed, 78 insertions(+) create mode 100644 .github/workflows/sonarqube.yml create mode 100644 sonar-project.properties diff --git a/.github/workflows/sonarqube.yml b/.github/workflows/sonarqube.yml new file mode 100644 index 000000000..9d67a0809 --- /dev/null +++ b/.github/workflows/sonarqube.yml @@ -0,0 +1,46 @@ +name: SonarQube Analysis (Java) + +on: + pull_request: + types: [opened, synchronize, reopened, closed] + branches: + - develop + +env: + PROJECT_NAME: qppa-repos-sonarqube-analysis + +jobs: + build: + name: Java Quality Gate + permissions: + id-token: write + contents: read + runs-on: ubuntu-latest + timeout-minutes: 5 + + steps: + # 1) Check out the repository + - uses: actions/checkout@v2 + + # 2) Print the PR’s head‐branch + - name: Print branch name + run: | + echo "Current branch: ${GITHUB_HEAD_REF}" + + + # 3) Configure AWS credentials + - name: Configure AWS credentials + uses: aws-actions/configure-aws-credentials@v1 + with: + role-to-assume: arn:aws:iam::730335206644:role/delegatedadmin/developer/qppa-github-actions-role + aws-region: us-east-1 + + # 4) Kick off the CodeBuild project, passing the repo name into GITHUB_REPO_NAME + - name: Trigger CodeBuild SonarQube Scan + run: | + aws codebuild start-build \ + --project-name "${PROJECT_NAME}" \ + --source-type-override "GITHUB" \ + --source-location-override "${{ github.event.repository.html_url }}" \ + --source-version "${GITHUB_HEAD_REF}" \ + --environment-variables-override name=GITHUB_REPO_NAME,value="${{ github.event.repository.name }}",type=PLAINTEXT diff --git a/sonar-project.properties b/sonar-project.properties new file mode 100644 index 000000000..2d69db7b8 --- /dev/null +++ b/sonar-project.properties @@ -0,0 +1,32 @@ +# ------------------ Project metadata ------------------ +sonar.organization=cmsgov +sonar.projectKey=qpp-conversion-tool +sonar.projectName=qpp-conversion-tool +sonar.projectVersion=1.0 + +# ------------------ Make scanner wait for Quality Gate and use Git SCM ------------------ +sonar.qualitygate.wait=true +sonar.scm.provider=git + +# Disable SonarCloud?s CI auto-detection +sonar.ci.autoconfig.disabled=true + +# ------------------ Character encoding ------------------ +sonar.sourceEncoding=UTF-8 + +# ------------------ Source/test folders (all modules) ------------------ +sonar.sources=**/src/main/java +sonar.tests=**/src/test/java + +# ------------------ Java binaries (all modules) ------------------ +sonar.java.binaries=**/target/classes +sonar.java.test.binaries=**/target/test-classes + +# ------------------ JaCoCo aggregate coverage XML (from test-coverage module) ------------------ +sonar.coverage.jacoco.xmlReportPaths=**/test-coverage/target/site/jacoco-aggregate/jacoco.xml + +# ------------------ JUnit report (so Sonar shows test pass/fail counts) ------------------ +sonar.junit.reportPaths=**/target/surefire-reports + +# ------------------ Exclusions ------------------ +sonar.exclusions=**/target/**,**/*.generated.java From 45c5e5f545d186bf0cff929cfc57570cbf6488aa Mon Sep 17 00:00:00 2001 From: Chetan Munegowda Date: Tue, 3 Jun 2025 10:52:49 -0400 Subject: [PATCH 19/22] QPPA-10370: fix docker comd --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 61aa15f14..d94d6d4e3 100644 --- a/README.md +++ b/README.md @@ -74,7 +74,7 @@ directory. ```shell # Build the Docker image and run the container using docker-compose. -docker-compose -f ./docker-compose.test.yaml up --build +docker compose -f ./docker-compose.test.yaml up --build ``` #### Invoking the Endpoint From 2aa94580e88d5b165cb05c63b5a870bc3b5b4c87 Mon Sep 17 00:00:00 2001 From: Chetan Munegowda Date: Tue, 3 Jun 2025 11:11:41 -0400 Subject: [PATCH 20/22] QPPA-10370: fix sonarbuild issue --- sonar-project.properties | 50 +++++++++++++++++++++++++++++++--------- 1 file changed, 39 insertions(+), 11 deletions(-) diff --git a/sonar-project.properties b/sonar-project.properties index 2d69db7b8..b5c6b6f53 100644 --- a/sonar-project.properties +++ b/sonar-project.properties @@ -4,7 +4,7 @@ sonar.projectKey=qpp-conversion-tool sonar.projectName=qpp-conversion-tool sonar.projectVersion=1.0 -# ------------------ Make scanner wait for Quality Gate and use Git SCM ------------------ +# ------------------ Make scanner wait for Quality Gate & use Git SCM ------------------ sonar.qualitygate.wait=true sonar.scm.provider=git @@ -15,18 +15,46 @@ sonar.ci.autoconfig.disabled=true sonar.sourceEncoding=UTF-8 # ------------------ Source/test folders (all modules) ------------------ -sonar.sources=**/src/main/java -sonar.tests=**/src/test/java +sonar.sources=\ + commons/src/main/java,\ + converter/src/main/java,\ + commandline/src/main/java,\ + rest-api/src/main/java,\ + generate/src/main/java + +sonar.tests=\ + commons/src/test/java,\ + converter/src/test/java,\ + commandline/src/test/java,\ + rest-api/src/test/java,\ + generate/src/test/java # ------------------ Java binaries (all modules) ------------------ -sonar.java.binaries=**/target/classes -sonar.java.test.binaries=**/target/test-classes - -# ------------------ JaCoCo aggregate coverage XML (from test-coverage module) ------------------ -sonar.coverage.jacoco.xmlReportPaths=**/test-coverage/target/site/jacoco-aggregate/jacoco.xml - -# ------------------ JUnit report (so Sonar shows test pass/fail counts) ------------------ -sonar.junit.reportPaths=**/target/surefire-reports +sonar.java.binaries=\ + commons/target/classes,\ + converter/target/classes,\ + commandline/target/classes,\ + rest-api/target/classes,\ + generate/target/classes + +sonar.java.test.binaries=\ + commons/target/test-classes,\ + converter/target/test-classes,\ + commandline/target/test-classes,\ + rest-api/target/test-classes,\ + generate/target/test-classes + +# ------------------ JaCoCo aggregate coverage XML ????????????????????????????? +sonar.coverage.jacoco.xmlReportPaths=\ + test-coverage/target/site/jacoco-aggregate/jacoco.xml + +# ------------------ JUnit report (so Sonar shows test pass/fail counts) ??????????????? +sonar.junit.reportPaths=\ + commons/target/surefire-reports,\ + converter/target/surefire-reports,\ + commandline/target/surefire-reports,\ + rest-api/target/surefire-reports,\ + generate/target/surefire-reports # ------------------ Exclusions ------------------ sonar.exclusions=**/target/**,**/*.generated.java From 36fd330803cd1d4ec45c9ac39fce073817708850 Mon Sep 17 00:00:00 2001 From: Chetan Munegowda Date: Tue, 3 Jun 2025 13:02:43 -0400 Subject: [PATCH 21/22] QPPA-10370: fix comments --- sonar-project.properties | 46 +++++++++++++++++++++++++++++++--------- 1 file changed, 36 insertions(+), 10 deletions(-) diff --git a/sonar-project.properties b/sonar-project.properties index b5c6b6f53..72c070be4 100644 --- a/sonar-project.properties +++ b/sonar-project.properties @@ -1,20 +1,33 @@ -# ------------------ Project metadata ------------------ +# SonarQube Project Configuration for QPP Conversion Tool + +# ----------------------------------------------------------------------------- +# Project Metadata +# ----------------------------------------------------------------------------- sonar.organization=cmsgov sonar.projectKey=qpp-conversion-tool sonar.projectName=qpp-conversion-tool sonar.projectVersion=1.0 -# ------------------ Make scanner wait for Quality Gate & use Git SCM ------------------ +# ----------------------------------------------------------------------------- +# Quality Gate & SCM Integration +# ----------------------------------------------------------------------------- +# Wait for the quality gate result before finishing the scan sonar.qualitygate.wait=true +# Use Git to detect changed files and SCM information sonar.scm.provider=git -# Disable SonarCloud?s CI auto-detection +# Disable automatic CI configuration detection (SonarCloud) sonar.ci.autoconfig.disabled=true -# ------------------ Character encoding ------------------ +# ----------------------------------------------------------------------------- +# Source Code Encoding +# ----------------------------------------------------------------------------- sonar.sourceEncoding=UTF-8 -# ------------------ Source/test folders (all modules) ------------------ +# ----------------------------------------------------------------------------- +# Source and Test Locations (All Maven Modules) +# ----------------------------------------------------------------------------- +# List of source directories to analyze sonar.sources=\ commons/src/main/java,\ converter/src/main/java,\ @@ -22,6 +35,7 @@ sonar.sources=\ rest-api/src/main/java,\ generate/src/main/java +# List of test directories to analyze sonar.tests=\ commons/src/test/java,\ converter/src/test/java,\ @@ -29,7 +43,10 @@ sonar.tests=\ rest-api/src/test/java,\ generate/src/test/java -# ------------------ Java binaries (all modules) ------------------ +# ----------------------------------------------------------------------------- +# Compiled Class Locations (All Maven Modules) +# ----------------------------------------------------------------------------- +# Paths to compiled bytecode for main sources sonar.java.binaries=\ commons/target/classes,\ converter/target/classes,\ @@ -37,6 +54,7 @@ sonar.java.binaries=\ rest-api/target/classes,\ generate/target/classes +# Paths to compiled bytecode for test sources sonar.java.test.binaries=\ commons/target/test-classes,\ converter/target/test-classes,\ @@ -44,11 +62,14 @@ sonar.java.test.binaries=\ rest-api/target/test-classes,\ generate/target/test-classes -# ------------------ JaCoCo aggregate coverage XML ????????????????????????????? +# ----------------------------------------------------------------------------- +# Code Coverage and Test Reports +# ----------------------------------------------------------------------------- +# JaCoCo aggregate coverage report (from test-coverage module) sonar.coverage.jacoco.xmlReportPaths=\ test-coverage/target/site/jacoco-aggregate/jacoco.xml -# ------------------ JUnit report (so Sonar shows test pass/fail counts) ??????????????? +# JUnit test report directories for each module sonar.junit.reportPaths=\ commons/target/surefire-reports,\ converter/target/surefire-reports,\ @@ -56,5 +77,10 @@ sonar.junit.reportPaths=\ rest-api/target/surefire-reports,\ generate/target/surefire-reports -# ------------------ Exclusions ------------------ -sonar.exclusions=**/target/**,**/*.generated.java +# ----------------------------------------------------------------------------- +# File Exclusions +# ----------------------------------------------------------------------------- +# Exclude build artifacts and generated code +sonar.exclusions=\ + **/target/**,\ + **/*.generated.java From 0111359b74be565f3be68b1caf111d4d8b84f71b Mon Sep 17 00:00:00 2001 From: John Manack Date: Fri, 6 Jun 2025 09:44:18 -0400 Subject: [PATCH 22/22] chore: QPPA-10498 bump version number and updates measures data --- acceptance-tests/pom.xml | 2 +- commandline/pom.xml | 2 +- commons/pom.xml | 2 +- commons/src/main/resources/measures-data.json | 14 +++++++------- converter/pom.xml | 4 ++-- generate-race-cpcplus/pom.xml | 2 +- generate/pom.xml | 2 +- pom.xml | 2 +- qrda3-update-measures/pom.xml | 2 +- rest-api/pom.xml | 2 +- test-commons/pom.xml | 2 +- test-coverage/pom.xml | 2 +- 12 files changed, 19 insertions(+), 19 deletions(-) diff --git a/acceptance-tests/pom.xml b/acceptance-tests/pom.xml index 0b6a6303b..99f3089ca 100644 --- a/acceptance-tests/pom.xml +++ b/acceptance-tests/pom.xml @@ -3,7 +3,7 @@ 4.0.0 acceptance-tests gov.cms.qpp.conversion - 2024.2.12-RELEASE + 2024.2.13-RELEASE conversion-tests jar diff --git a/commandline/pom.xml b/commandline/pom.xml index 432bc8d69..8bff815e1 100644 --- a/commandline/pom.xml +++ b/commandline/pom.xml @@ -6,7 +6,7 @@ gov.cms.qpp.conversion qpp-conversion-tool-parent - 2024.2.12-RELEASE + 2024.2.13-RELEASE ../pom.xml diff --git a/commons/pom.xml b/commons/pom.xml index 1120efd4c..120807f2e 100644 --- a/commons/pom.xml +++ b/commons/pom.xml @@ -6,7 +6,7 @@ gov.cms.qpp.conversion qpp-conversion-tool-parent - 2024.2.12-RELEASE + 2024.2.13-RELEASE ../pom.xml diff --git a/commons/src/main/resources/measures-data.json b/commons/src/main/resources/measures-data.json index 5d4318200..5db57ff91 100644 --- a/commons/src/main/resources/measures-data.json +++ b/commons/src/main/resources/measures-data.json @@ -3585,7 +3585,7 @@ "reportingCategory": "required", "substitutes": [], "measureSpecification": { - "default": "https://qpp.cms.gov/docs/pi_specifications/Measure Specifications/2025-MIPS-Promoting-Interoperability-Measure-Electronic-Case-Reporting.pdf" + "default": "https://qpp.cms.gov/docs/pi_specifications/Measure%20Specifications/2025-MIPS-Promoting-Interoperability-Measure-Electronic-Case-Reporting-Updated-April-2025.pdf" }, "measureSets": [], "exclusion": [ @@ -3648,7 +3648,7 @@ "PI_PHCDRR_3_EX_3" ], "measureSpecification": { - "default": "https://qpp.cms.gov/docs/pi_specifications/Measure Specifications/2025-MIPS-Promoting-Interoperability-Measure-Electronic-Case-Reporting.pdf" + "default": "https://qpp.cms.gov/docs/pi_specifications/Measure%20Specifications/2025-MIPS-Promoting-Interoperability-Measure-Electronic-Case-Reporting-Updated-April-2025.pdf" }, "measureSets": [], "exclusion": null, @@ -3704,7 +3704,7 @@ "PI_PHCDRR_3_EX_3" ], "measureSpecification": { - "default": "https://qpp.cms.gov/docs/pi_specifications/Measure Specifications/2025-MIPS-Promoting-Interoperability-Measure-Electronic-Case-Reporting.pdf" + "default": "https://qpp.cms.gov/docs/pi_specifications/Measure%20Specifications/2025-MIPS-Promoting-Interoperability-Measure-Electronic-Case-Reporting-Updated-April-2025.pdf" }, "measureSets": [], "exclusion": null, @@ -3760,7 +3760,7 @@ "PI_PHCDRR_3_EX_2" ], "measureSpecification": { - "default": "https://qpp.cms.gov/docs/pi_specifications/Measure Specifications/2025-MIPS-Promoting-Interoperability-Measure-Electronic-Case-Reporting.pdf" + "default": "https://qpp.cms.gov/docs/pi_specifications/Measure%20Specifications/2025-MIPS-Promoting-Interoperability-Measure-Electronic-Case-Reporting-Updated-April-2025.pdf" }, "measureSets": [], "exclusion": null, @@ -4385,7 +4385,7 @@ "M1425" ], "measureSpecification": { - "default": "https://qpp.cms.gov/docs/pi_specifications/Measure Specifications/2025-MIPS-Promoting-Interoperability-Measure-Electronic-Case-Reporting.pdf" + "default": "https://qpp.cms.gov/docs/pi_specifications/Measure%20Specifications/2025-MIPS-Promoting-Interoperability-Measure-Electronic-Case-Reporting-Updated-April-2025.pdf" }, "allowedRegistrationTypes": [ "apm", @@ -4439,7 +4439,7 @@ "M1425" ], "measureSpecification": { - "default": "https://qpp.cms.gov/docs/pi_specifications/Measure Specifications/2025-MIPS-Promoting-Interoperability-Measure-Electronic-Case-Reporting.pdf" + "default": "https://qpp.cms.gov/docs/pi_specifications/Measure%20Specifications/2025-MIPS-Promoting-Interoperability-Measure-Electronic-Case-Reporting-Updated-April-2025.pdf" }, "allowedRegistrationTypes": [ "apm", @@ -11136,7 +11136,7 @@ "pediatrics" ], "measureSpecification": { - "registry": "https://qpp.cms.gov/docs/QPP_quality_measure_specifications/CQM-Measures/2024_Measure_394_MIPSCQM.pdf" + "registry": "https://qpp.cms.gov/docs/QPP_quality_measure_specifications/CQM-Measures/2025_Measure_394_MIPSCQM.pdf" }, "overallAlgorithm": "overallStratumOnly", "strata": [ diff --git a/converter/pom.xml b/converter/pom.xml index 8876aa66a..2c10ccf2e 100644 --- a/converter/pom.xml +++ b/converter/pom.xml @@ -6,7 +6,7 @@ gov.cms.qpp.conversion qpp-conversion-tool-parent - 2024.2.12-RELEASE + 2024.2.13-RELEASE ../pom.xml @@ -170,7 +170,7 @@ gov.cms.qpp.conversion commons - 2024.2.12-RELEASE + 2024.2.13-RELEASE compile diff --git a/generate-race-cpcplus/pom.xml b/generate-race-cpcplus/pom.xml index af29cf844..e71b5f0b9 100644 --- a/generate-race-cpcplus/pom.xml +++ b/generate-race-cpcplus/pom.xml @@ -5,7 +5,7 @@ qpp-conversion-tool-parent gov.cms.qpp.conversion - 2024.2.12-RELEASE + 2024.2.13-RELEASE ../ 4.0.0 diff --git a/generate/pom.xml b/generate/pom.xml index d27e25bf9..ff3fcd3c0 100644 --- a/generate/pom.xml +++ b/generate/pom.xml @@ -5,7 +5,7 @@ qpp-conversion-tool-parent gov.cms.qpp.conversion - 2024.2.12-RELEASE + 2024.2.13-RELEASE ../pom.xml 4.0.0 diff --git a/pom.xml b/pom.xml index 7cc9dac31..76f77e795 100644 --- a/pom.xml +++ b/pom.xml @@ -6,7 +6,7 @@ gov.cms.qpp.conversion qpp-conversion-tool-parent pom - 2024.2.12-RELEASE + 2024.2.13-RELEASE QPP Conversion Tool diff --git a/qrda3-update-measures/pom.xml b/qrda3-update-measures/pom.xml index a2cdf3877..fc57a7295 100644 --- a/qrda3-update-measures/pom.xml +++ b/qrda3-update-measures/pom.xml @@ -3,7 +3,7 @@ qpp-conversion-tool-parent gov.cms.qpp.conversion - 2024.2.12-RELEASE + 2024.2.13-RELEASE ../ diff --git a/rest-api/pom.xml b/rest-api/pom.xml index 0aa660c98..06ccfa129 100644 --- a/rest-api/pom.xml +++ b/rest-api/pom.xml @@ -6,7 +6,7 @@ gov.cms.qpp.conversion qpp-conversion-tool-parent - 2024.2.12-RELEASE + 2024.2.13-RELEASE ../pom.xml diff --git a/test-commons/pom.xml b/test-commons/pom.xml index 88ce31d5a..4f82fd9f4 100644 --- a/test-commons/pom.xml +++ b/test-commons/pom.xml @@ -6,7 +6,7 @@ gov.cms.qpp.conversion qpp-conversion-tool-parent - 2024.2.12-RELEASE + 2024.2.13-RELEASE ../pom.xml diff --git a/test-coverage/pom.xml b/test-coverage/pom.xml index dd76aa1cb..2c79e9188 100644 --- a/test-coverage/pom.xml +++ b/test-coverage/pom.xml @@ -6,7 +6,7 @@ gov.cms.qpp.conversion qpp-conversion-tool-parent - 2024.2.12-RELEASE + 2024.2.13-RELEASE ../pom.xml