diff --git a/.github/workflows/sonarqube.yml b/.github/workflows/sonarqube.yml new file mode 100644 index 000000000..d1adfe8cd --- /dev/null +++ b/.github/workflows/sonarqube.yml @@ -0,0 +1,26 @@ +name: SonarQube + +on: + pull_request: + push: + branches: + - master + +jobs: + sonarqube: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - name: SonarQube Scan + uses: sonarsource/sonarqube-scan-action@master + env: + SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} + SONAR_HOST_URL: ${{ secrets.SONAR_HOST_URL }} + # If you wish to fail your job when the Quality Gate is red, uncomment the + # following lines. This would typically be used to fail a deployment. + - name: SonarQube Quality Gate check + uses: sonarsource/sonarqube-quality-gate-action@master + timeout-minutes: 5 + env: + SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} + SONAR_HOST_URL: ${{ secrets.SONAR_HOST_URL }} diff --git a/.gitignore b/.gitignore index e765ef7b0..b9960e21e 100644 --- a/.gitignore +++ b/.gitignore @@ -1,8 +1,18 @@ -node_modules +# IDE stuff .idea +.vscode + +# dependencies +node_modules +vendor + +# artifacts .sass-cache npm-debug.log +dist -# Don't mess with other dev's config +# don't mess with other dev's config launch_phpunit.sh -dist + +# since we are using only dev dependencies atm, we can exclude it from polluting the repo +composer.lock diff --git a/Gruntfile.js b/Gruntfile.js index 8f9ebc37a..dc4cb382f 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -338,18 +338,17 @@ module.exports = function (grunt) { replacement: function (matchedString) { jsResources = []; - var jsArray = matchedString.match(/script\([A-z']+,\s?'([\/A-z.-]+)'\);/g); + const jsArray = matchedString.match(/script\([A-z]+::[A-z_]+,\s?'([\/A-z.-]+)'\);/g); jsArray.forEach(function (file) { - var regex = /script\([A-z']+,\s?'([\/A-z.-]+)'\);/g; - var matches = regex.exec(file); + const regex = /script\([A-z]+::[A-z_]+,\s?'([\/A-z.-]+)'\);/g; + const matches = regex.exec(file); if (matches) { jsResources.push("'js/" + matches[1] + ".js'"); - } }); //Replace the entire build-js-start to build-js-end block with this