lint-all.sh 519 Bytes
Newer Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#!/bin/bash

set -e -E -u -o pipefail

pwsh -command "Install-Module -Name PSScriptAnalyzer -Scope CurrentUser -SkipPublisherCheck"
echo "Linting PowerShell code"
pwsh -file ./.ci/lint-powershell.ps1 || exit 1

conda create -q -y -n test-env \
    "python=3.13[build=*_cp*]" \
    'pre-commit>=3.8.0' \
    'r-lintr>=3.1.2'

# shellcheck disable=SC1091
source activate test-env

17
18
echo "Running pre-commit checks"
pre-commit run --all-files || exit 1
19
20
21

echo "Linting R code"
Rscript ./.ci/lint-r-code.R "$(pwd)" || exit 1