<commit_before>trigger:
- main

jobs:
- job: Sourcery
  pool:
    vmImage: 'macOS-12'
  steps:
    - script: brew install sourcery
      displayName: Install Sourcery
    - script: make --always-make sourcery
      displayName: Generate sources
    - script: "! git diff -U0 | grep '^[-+][^-+]' | grep --invert-match '// Generated using Sourcery'"
      displayName: Check changed files ignoring Sourcery's version

- job: Linux
  pool:
    vmImage: 'ubuntu-latest'
  strategy:
    maxParallel: 10
    matrix:
      swift57:
        containerImage: swift:5.7
  container: $[ variables['containerImage'] ]
  steps:
    - script: swift test --parallel -Xswiftc -DDISABLE_FOCUSED_EXAMPLES
      displayName: swift test

- job: Xcode
  pool:
    vmImage: 'macOS-12'
  strategy:
    maxParallel: 10
    matrix:
      xcode14:
        DEVELOPER_DIR: /Applications/Xcode_14.0.1.app
  steps:
    - script: |
        sw_vers
        xcodebuild -version
      displayName: Version Informations
    - script: xcodebuild -scheme swiftlint test -destination "platform=macOS" OTHER_SWIFT_FLAGS="\$(inherited) -D DISABLE_FOCUSED_EXAMPLES"
      displayName: xcodebuild test

- job: SwiftPM
  pool:
    vmImage: 'macOS-12'
  strategy:
    maxParallel: 10
    matrix:
      xcode14:
        DEVELOPER_DIR: /Applications/Xcode_14.0.1.app
  steps:
    - script: |
        sw_vers
        xcodebuild -version
      displayName: Version Informations
    - script: swift test --parallel --enable-code-coverage -Xswiftc -DDISABLE_FOCUSED_EXAMPLES
      displayName: swift test
    # - script: |
    #     xcrun llvm-cov export -format="lcov" .build/debug/SwiftLintPackageTests.xctest/Contents/MacOS/SwiftLintPackageTests -instr-profile .build/debug/codecov/default.profdata > coverage.lcov
    #     bash <(curl -s https://codecov.io/bash)
    #   displayName: Upload code coverage
    #   condition: eq(variables['DEVELOPER_DIR'], '/Applications/Xcode_14.0.1.app')

- job: CocoaPods<commit_msg>[CI] Disable xcodebuild tests (#4287)<commit_after>trigger:
- main

jobs:
- job: Sourcery
  pool:
    vmImage: 'macOS-12'
  steps:
    - script: brew install sourcery
      displayName: Install Sourcery
    - script: make --always-make sourcery
      displayName: Generate sources
    - script: "! git diff -U0 | grep '^[-+][^-+]' | grep --invert-match '// Generated using Sourcery'"
      displayName: Check changed files ignoring Sourcery's version

- job: Linux
  pool:
    vmImage: 'ubuntu-latest'
  strategy:
    maxParallel: 10
    matrix:
      swift57:
        containerImage: swift:5.7
  container: $[ variables['containerImage'] ]
  steps:
    - script: swift test --parallel -Xswiftc -DDISABLE_FOCUSED_EXAMPLES
      displayName: swift test

# TODO: Re-enable when FB11648454 is fixed
# - job: Xcode
#   pool:
#     vmImage: 'macOS-12'
#   strategy:
#     maxParallel: 10
#     matrix:
#       xcode14:
#         DEVELOPER_DIR: /Applications/Xcode_14.0.1.app
#   steps:
#     - script: |
#         sw_vers
#         xcodebuild -version
#       displayName: Version Informations
#     - script: xcodebuild -scheme swiftlint test -destination "platform=macOS" OTHER_SWIFT_FLAGS="\$(inherited) -D DISABLE_FOCUSED_EXAMPLES"
#       displayName: xcodebuild test

- job: SwiftPM
  pool:
    vmImage: 'macOS-12'
  strategy:
    maxParallel: 10
    matrix:
      xcode14:
        DEVELOPER_DIR: /Applications/Xcode_14.0.1.app
  steps:
    - script: |
        sw_vers
        xcodebuild -version
      displayName: Version Informations
    - script: swift test --parallel --enable-code-coverage -Xswiftc -DDISABLE_FOCUSED_EXAMPLES
      displayName: swift test
    # - script: |
    #     xcrun llvm-cov export -format="lcov" .build/debug/SwiftLintPackageTests.xctest/Contents/MacOS/SwiftLintPackageTests -instr-profile .build/debug/codecov/default.profdata > coverage.lcov
    #     bash <(curl -s https://codecov.io/bash)
    #   displayName: Upload code coverage
    #   condition: eq(variables['DEVELOPER_DIR'], '/Applications/Xcode_14.0.1.app')

- job: CocoaPods
{'fraction_non_alphanumeric': 0.1101212571145756, 'fraction_numerical': 0.019302152932442463, 'mean_word_length': 2.784644194756554, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, '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': '1158647', 'n_tokens_mistral': 1423, 'n_tokens_neox': 1347, 'n_words': 307}