We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent da6f264 commit 71b8b16Copy full SHA for 71b8b16
‎fetch-issues.sh‎
@@ -0,0 +1,22 @@
1
+#!/bin/zsh
2
+set -eux
3
+
4
+usage() {
5
+ echo "Usage: $0 <rule>"
6
+ echo "Fetches issues for the specified rule from SonarCloud."
7
+ echo "Example:"
8
+ echo "$0 java:S106"
9
+}
10
11
+# Check if "rule" parameter is provided
12
+if [ -z "$1" ]; then
13
+ echo "Error: No rule parameter provided."
14
+ usage
15
+ exit 1
16
+fi
17
18
+rule=$1
19
+host=${SONAR_HOST:-https://sonarcloud.io}
20
+curl \
21
+ --header "Authorization: Bearer ${SONAR_TOKEN}" \
22
+ "${host}/api/issues/search?organization=pixee&componentKeys=pixee_bad-java-code&rules=${rule}"
0 commit comments