<commit_before>name: Java CI
on:
  push:
    branches:
    - master
    - release/*
  pull_request:
    branches:
    - master
    - release/*
jobs:
  build:
    runs-on: ${{ matrix.os }}
    strategy:
      fail-fast: false
      matrix:
        java_version: ['8', '11', '15']
        os: ['ubuntu-latest']
    env:
      JAVA_OPTS: "-XX:+TieredCompilation -XX:TieredStopAtLevel=1"
    steps:
    - uses: actions/checkout@v2
      with:
        fetch-depth: 0  # Shallow clones should be disabled for a better relevancy of analysis
    - name: Set up JDK
      uses: joschi/setup-jdk@v2.3.0
      with:
        java-version: ${{ matrix.java_version }}
    - uses: actions/cache@v2.1.2
      if: runner.os != 'Windows'
      with:
        path: ~/.m2/repository
        key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
        restore-keys: |
          ${{ runner.os }}-maven-
    - uses: actions/cache@v2.1.2
      if: runner.os == 'Windows'
      with:
        path: ~/.m2/repository
        key: ${{ runner.os }}-maven-${{ hashFiles('**\pom.xml') }}
        restore-keys: |
          ${{ runner.os }}-maven-
    - name: Cache SonarCloud packages
      uses: actions/cache@v2.1.2
      if: matrix.java_version == '11'
      with:
        path: ~/.sonar/cache
        key: ${{ runner.os }}-sonar
        restore-keys: ${{ runner.os }}-sonar
    - name: Initialize CodeQL
      uses: github/codeql-action/init@v1
      if: matrix.java_version == '8'
      with:
        languages: java
    - name: Build
      run: ./mvnw --no-transfer-progress -Pjakarta-apis -V -B -ff -s .github/settings.xml install
    - name: Analyze with SonarCloud
      if: matrix.java_version == '11'
      env:
        GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}  # Needed to get PR information, if any
        SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
      run: ./mvnw --no-transfer-progress -Pjakarta-apis -V -B -ff -s .github/settings.xml org.sonarsource.scanner.maven:sonar-maven-plugin:sonar
    - name: Perform CodeQL Analysis
      uses: github/codeql-action/analyze@v1
      if: matrix.java_version == '8'<commit_msg>Run SonarCloud analysis only in dropwizard/dropwizard (#3535)<commit_after>name: Java CI
on:
  push:
    branches:
    - master
    - release/*
  pull_request:
    branches:
    - master
    - release/*
jobs:
  build:
    runs-on: ${{ matrix.os }}
    strategy:
      fail-fast: false
      matrix:
        java_version: ['8', '11', '15']
        os: ['ubuntu-latest']
    env:
      JAVA_OPTS: "-XX:+TieredCompilation -XX:TieredStopAtLevel=1"
    steps:
    - uses: actions/checkout@v2
      with:
        fetch-depth: 0  # Shallow clones should be disabled for a better relevancy of analysis
    - name: Set up JDK
      uses: joschi/setup-jdk@v2.3.0
      with:
        java-version: ${{ matrix.java_version }}
    - uses: actions/cache@v2.1.2
      if: runner.os != 'Windows'
      with:
        path: ~/.m2/repository
        key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
        restore-keys: |
          ${{ runner.os }}-maven-
    - uses: actions/cache@v2.1.2
      if: runner.os == 'Windows'
      with:
        path: ~/.m2/repository
        key: ${{ runner.os }}-maven-${{ hashFiles('**\pom.xml') }}
        restore-keys: |
          ${{ runner.os }}-maven-
    - name: Cache SonarCloud packages
      uses: actions/cache@v2.1.2
      if: ${{ github.repository == 'dropwizard/dropwizard' && matrix.java_version == '11' }}
      with:
        path: ~/.sonar/cache
        key: ${{ runner.os }}-sonar
        restore-keys: ${{ runner.os }}-sonar
    - name: Initialize CodeQL
      uses: github/codeql-action/init@v1
      if: matrix.java_version == '8'
      with:
        languages: java
    - name: Build
      run: ./mvnw --no-transfer-progress -Pjakarta-apis -V -B -ff -s .github/settings.xml install
    - name: Analyze with SonarCloud
      if: ${{ github.repository == 'dropwizard/dropwizard' && matrix.java_version == '11' }}
      env:
        GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}  # Needed to get PR information, if any
        SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
      run: ./mvnw --no-transfer-progress -Pjakarta-apis -V -B -ff -s .github/settings.xml org.sonarsource.scanner.maven:sonar-maven-plugin:sonar
    - name: Perform CodeQL Analysis
      uses: github/codeql-action/analyze@v1
      if: matrix.java_version == '8'
{'fraction_non_alphanumeric': 0.15127970749542963, 'fraction_numerical': 0.014625228519195612, 'mean_word_length': 2.1353868194842405, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 8}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5187082', 'n_tokens_mistral': 1561, 'n_tokens_neox': 1508, 'n_words': 339}