diff --git a/.github/dependabot.yml b/.github/dependabot.yml index c5f33e3..480f81d 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -12,5 +12,9 @@ updates: interval: "daily" timezone: "CET" open-pull-requests-limit: 100 + cooldown: + default-days: 5 + exclude: + - "SonarSource/*" commit-message: prefix: "NO-JIRA " diff --git a/.github/workflows/unit-tests.yml b/.github/workflows/unit-tests.yml index cc0575a..1511ed9 100644 --- a/.github/workflows/unit-tests.yml +++ b/.github/workflows/unit-tests.yml @@ -15,7 +15,7 @@ jobs: - name: Setup Node.js uses: actions/setup-node@v6 with: - node-version: "20" + node-version: "24" cache: "npm" - name: Install dependencies diff --git a/contributing.md b/contributing.md index 868fed1..0fde71c 100644 --- a/contributing.md +++ b/contributing.md @@ -32,7 +32,7 @@ Both the main action and the secondary _install-build-wrapper_ action are [Javas ### Requirements -Make sure you have node 20 & npm installed. We recommend using [nvm](https://docs.npmjs.com/downloading-and-installing-node-js-and-npm#using-a-node-version-manager-to-install-nodejs-and-npm) for that. +Make sure you have node 24 & npm installed. We recommend using [nvm](https://docs.npmjs.com/downloading-and-installing-node-js-and-npm#using-a-node-version-manager-to-install-nodejs-and-npm) for that. ### Building & testing diff --git a/rollup.config.js b/rollup.config.js index 9b97935..0b0a116 100644 --- a/rollup.config.js +++ b/rollup.config.js @@ -1,3 +1,21 @@ +// SonarQube Scan Action +// Copyright (C) SonarSource Sàrl +// mailto:contact AT sonarsource DOT com +// +// This program is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 3 of the License, or (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with this program; if not, write to the Free Software Foundation, +// Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + import commonjs from "@rollup/plugin-commonjs"; import { nodeResolve } from "@rollup/plugin-node-resolve"; diff --git a/scripts/cert.sh b/scripts/cert.sh index de63a55..e3f2869 100755 --- a/scripts/cert.sh +++ b/scripts/cert.sh @@ -1,5 +1,23 @@ #!/usr/bin/env bash +# SonarQube Scan Action +# Copyright (C) SonarSource Sàrl +# mailto:contact AT sonarsource DOT com +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 3 of the License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public License +# along with this program; if not, write to the Free Software Foundation, +# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + if [[ -n "${SONAR_ROOT_CERT}" ]]; then echo "Adding custom root certificate to java certificate store" rm -f /tmp/tmpcert.pem diff --git a/scripts/configure_paths.sh b/scripts/configure_paths.sh index b9f33ac..82e6a5d 100755 --- a/scripts/configure_paths.sh +++ b/scripts/configure_paths.sh @@ -1,5 +1,23 @@ #!/usr/bin/env bash +# SonarQube Scan Action +# Copyright (C) SonarSource Sàrl +# mailto:contact AT sonarsource DOT com +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 3 of the License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public License +# along with this program; if not, write to the Free Software Foundation, +# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + if [[ ${ARCH} != "X64" && ! (${ARCH} == "ARM64" && (${OS} == "macOS" || ${OS} == "Linux")) ]]; then echo "::error::Architecture '${ARCH}' is unsupported by build-wrapper" exit 1 diff --git a/scripts/create_install_path.sh b/scripts/create_install_path.sh index 3a3618d..52b7fc0 100755 --- a/scripts/create_install_path.sh +++ b/scripts/create_install_path.sh @@ -1,5 +1,23 @@ #!/usr/bin/env bash +# SonarQube Scan Action +# Copyright (C) SonarSource Sàrl +# mailto:contact AT sonarsource DOT com +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 3 of the License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public License +# along with this program; if not, write to the Free Software Foundation, +# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + source "$(dirname -- "$0")/utils.sh" echo "Installation path is '${INSTALL_PATH}'" diff --git a/scripts/download.sh b/scripts/download.sh index 5303d52..e85f201 100755 --- a/scripts/download.sh +++ b/scripts/download.sh @@ -1,5 +1,23 @@ #!/usr/bin/env bash +# SonarQube Scan Action +# Copyright (C) SonarSource Sàrl +# mailto:contact AT sonarsource DOT com +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 3 of the License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public License +# along with this program; if not, write to the Free Software Foundation, +# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + source "$(dirname -- "$0")/utils.sh" VERIFY_CORRECTNESS=false diff --git a/scripts/fetch_latest_version.sh b/scripts/fetch_latest_version.sh index 57c7249..a319947 100755 --- a/scripts/fetch_latest_version.sh +++ b/scripts/fetch_latest_version.sh @@ -1,5 +1,23 @@ #!/usr/bin/env bash +# SonarQube Scan Action +# Copyright (C) SonarSource Sàrl +# mailto:contact AT sonarsource DOT com +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 3 of the License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public License +# along with this program; if not, write to the Free Software Foundation, +# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + source "$(dirname -- "$0")/utils.sh" SONAR_SCANNER_VERSION=$(curl -sSL -H "Accept: application/vnd.github+json" \ diff --git a/scripts/utils.sh b/scripts/utils.sh index cc79029..66bfe65 100755 --- a/scripts/utils.sh +++ b/scripts/utils.sh @@ -1,5 +1,23 @@ #!/usr/bin/env bash +# SonarQube Scan Action +# Copyright (C) SonarSource Sàrl +# mailto:contact AT sonarsource DOT com +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 3 of the License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public License +# along with this program; if not, write to the Free Software Foundation, +# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + check_status() { exit_status=$? if [ $exit_status -ne 0 ]; then diff --git a/src/install-build-wrapper/__tests__/utils.test.js b/src/install-build-wrapper/__tests__/utils.test.js index 8106002..7220c53 100644 --- a/src/install-build-wrapper/__tests__/utils.test.js +++ b/src/install-build-wrapper/__tests__/utils.test.js @@ -1,3 +1,21 @@ +// SonarQube Scan Action +// Copyright (C) SonarSource Sàrl +// mailto:contact AT sonarsource DOT com +// +// This program is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 3 of the License, or (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with this program; if not, write to the Free Software Foundation, +// Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + import assert from "node:assert/strict"; import { describe, it } from "node:test"; import { getBuildWrapperInfo } from "../utils.js"; diff --git a/src/install-build-wrapper/install-build-wrapper.js b/src/install-build-wrapper/install-build-wrapper.js index 1b8617e..8c83b7a 100644 --- a/src/install-build-wrapper/install-build-wrapper.js +++ b/src/install-build-wrapper/install-build-wrapper.js @@ -1,3 +1,21 @@ +// SonarQube Scan Action +// Copyright (C) SonarSource Sàrl +// mailto:contact AT sonarsource DOT com +// +// This program is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 3 of the License, or (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with this program; if not, write to the Free Software Foundation, +// Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + import * as core from "@actions/core"; import * as exec from "@actions/exec"; import * as fs from "fs"; diff --git a/src/install-build-wrapper/utils.js b/src/install-build-wrapper/utils.js index 8580769..9816814 100644 --- a/src/install-build-wrapper/utils.js +++ b/src/install-build-wrapper/utils.js @@ -1,3 +1,21 @@ +// SonarQube Scan Action +// Copyright (C) SonarSource Sàrl +// mailto:contact AT sonarsource DOT com +// +// This program is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 3 of the License, or (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with this program; if not, write to the Free Software Foundation, +// Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + import * as exec from "@actions/exec"; import * as path from "path"; diff --git a/src/main/__tests__/mocks.js b/src/main/__tests__/mocks.js index f2144e0..ec303ca 100644 --- a/src/main/__tests__/mocks.js +++ b/src/main/__tests__/mocks.js @@ -1,3 +1,21 @@ +// SonarQube Scan Action +// Copyright (C) SonarSource Sàrl +// mailto:contact AT sonarsource DOT com +// +// This program is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 3 of the License, or (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with this program; if not, write to the Free Software Foundation, +// Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + export function mockCore(overrides = {}) { return { setFailed: (msg) => console.error(msg), diff --git a/src/main/__tests__/sanity-checks.test.js b/src/main/__tests__/sanity-checks.test.js index a50871c..418783f 100644 --- a/src/main/__tests__/sanity-checks.test.js +++ b/src/main/__tests__/sanity-checks.test.js @@ -1,3 +1,21 @@ +// SonarQube Scan Action +// Copyright (C) SonarSource Sàrl +// mailto:contact AT sonarsource DOT com +// +// This program is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 3 of the License, or (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with this program; if not, write to the Free Software Foundation, +// Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + import mockfs from "mock-fs"; import assert from "node:assert/strict"; import { describe, it, mock } from "node:test"; diff --git a/src/main/__tests__/utils.test.js b/src/main/__tests__/utils.test.js index 9ed21aa..cc88650 100644 --- a/src/main/__tests__/utils.test.js +++ b/src/main/__tests__/utils.test.js @@ -1,3 +1,21 @@ +// SonarQube Scan Action +// Copyright (C) SonarSource Sàrl +// mailto:contact AT sonarsource DOT com +// +// This program is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 3 of the License, or (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with this program; if not, write to the Free Software Foundation, +// Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + import assert from "node:assert/strict"; import { describe, it } from "node:test"; import { diff --git a/src/main/index.js b/src/main/index.js index 90904ff..bbd0815 100644 --- a/src/main/index.js +++ b/src/main/index.js @@ -1,3 +1,21 @@ +// SonarQube Scan Action +// Copyright (C) SonarSource Sàrl +// mailto:contact AT sonarsource DOT com +// +// This program is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 3 of the License, or (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with this program; if not, write to the Free Software Foundation, +// Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + import * as core from "@actions/core"; import { installSonarScanner } from "./install-sonar-scanner"; import { runSonarScanner } from "./run-sonar-scanner"; diff --git a/src/main/install-sonar-scanner.js b/src/main/install-sonar-scanner.js index 73e4785..559d847 100644 --- a/src/main/install-sonar-scanner.js +++ b/src/main/install-sonar-scanner.js @@ -1,3 +1,21 @@ +// SonarQube Scan Action +// Copyright (C) SonarSource Sàrl +// mailto:contact AT sonarsource DOT com +// +// This program is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 3 of the License, or (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with this program; if not, write to the Free Software Foundation, +// Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + import * as core from "@actions/core"; import * as tc from "@actions/tool-cache"; import * as os from "os"; diff --git a/src/main/run-sonar-scanner.js b/src/main/run-sonar-scanner.js index a551f0e..425ec60 100644 --- a/src/main/run-sonar-scanner.js +++ b/src/main/run-sonar-scanner.js @@ -1,3 +1,21 @@ +// SonarQube Scan Action +// Copyright (C) SonarSource Sàrl +// mailto:contact AT sonarsource DOT com +// +// This program is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 3 of the License, or (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with this program; if not, write to the Free Software Foundation, +// Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + import * as core from "@actions/core"; import * as exec from "@actions/exec"; import * as fs from "fs"; diff --git a/src/main/sanity-checks.js b/src/main/sanity-checks.js index 054330a..922ee27 100644 --- a/src/main/sanity-checks.js +++ b/src/main/sanity-checks.js @@ -1,3 +1,21 @@ +// SonarQube Scan Action +// Copyright (C) SonarSource Sàrl +// mailto:contact AT sonarsource DOT com +// +// This program is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 3 of the License, or (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with this program; if not, write to the Free Software Foundation, +// Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + import fs from "fs"; import { join } from "path"; diff --git a/src/main/utils.js b/src/main/utils.js index 2b82886..87ba8b9 100644 --- a/src/main/utils.js +++ b/src/main/utils.js @@ -1,3 +1,21 @@ +// SonarQube Scan Action +// Copyright (C) SonarSource Sàrl +// mailto:contact AT sonarsource DOT com +// +// This program is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 3 of the License, or (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with this program; if not, write to the Free Software Foundation, +// Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + const platformFlavor = { linux: { x64: "linux-x64", diff --git a/test/assertFileContains b/test/assertFileContains index 588d845..1925ac4 100755 --- a/test/assertFileContains +++ b/test/assertFileContains @@ -1,5 +1,23 @@ #!/usr/bin/env bash +# SonarQube Scan Action +# Copyright (C) SonarSource Sàrl +# mailto:contact AT sonarsource DOT com +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 3 of the License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public License +# along with this program; if not, write to the Free Software Foundation, +# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + set -eou pipefail error() { echo -e "\\e[31m✗ $*\\e[0m"; } @@ -11,4 +29,4 @@ $scriptDir/assertFileExists "$1" if ! grep -q "$2" "$1"; then error "'$2' not found in '$1'" exit 1 -fi \ No newline at end of file +fi diff --git a/test/assertFileDoesntExist b/test/assertFileDoesntExist index 480b761..3593ae0 100755 --- a/test/assertFileDoesntExist +++ b/test/assertFileDoesntExist @@ -1,5 +1,23 @@ #!/usr/bin/env bash +# SonarQube Scan Action +# Copyright (C) SonarSource Sàrl +# mailto:contact AT sonarsource DOT com +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 3 of the License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public License +# along with this program; if not, write to the Free Software Foundation, +# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + set -eou pipefail error() { echo -e "\\e[31m✗ $*\\e[0m"; } @@ -7,4 +25,4 @@ error() { echo -e "\\e[31m✗ $*\\e[0m"; } if [ -f "$1" ]; then error "File '$1' found" exit 1 -fi \ No newline at end of file +fi diff --git a/test/assertFileExists b/test/assertFileExists index e0f2961..3dab41f 100755 --- a/test/assertFileExists +++ b/test/assertFileExists @@ -1,5 +1,23 @@ #!/usr/bin/env bash +# SonarQube Scan Action +# Copyright (C) SonarSource Sàrl +# mailto:contact AT sonarsource DOT com +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 3 of the License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public License +# along with this program; if not, write to the Free Software Foundation, +# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + set -eou pipefail error() { echo -e "\\e[31m✗ $*\\e[0m"; } @@ -7,4 +25,4 @@ error() { echo -e "\\e[31m✗ $*\\e[0m"; } if [ ! -f "$1" ]; then error "File '$1' not found" exit 1 -fi \ No newline at end of file +fi diff --git a/test/example-project/src/main.js b/test/example-project/src/main.js index 909cb02..d9dee61 100644 --- a/test/example-project/src/main.js +++ b/test/example-project/src/main.js @@ -1,3 +1,21 @@ +// SonarQube Scan Action +// Copyright (C) SonarSource Sàrl +// mailto:contact AT sonarsource DOT com +// +// This program is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 3 of the License, or (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with this program; if not, write to the Free Software Foundation, +// Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + function main() { console.log("Hello World"); }