Skip to content

Commit

Permalink
[CI] Enable NEWLINE linter (#6162)
Browse files Browse the repository at this point in the history
* Copy over newlines_linter.py from
https://github.com/pytorch/pytorch/blob/a94ec0a9a5ac91fcd9f69d6640ab0fe1efd068ae/tools/linter/adapters/newlines_linter.py
* Enable NEWLINE linter in CI
* Adds some files to the ignore list that probably shouldn't be changed
* Applies the linter `lintrunner -a --all-files --take NEWLINE`

We should move some of the adapter to some common place at some point,
or make it so that init will take them from pytorch automatically
  • Loading branch information
clee2000 authored Jan 10, 2025
1 parent 73eea90 commit f4a275b
Show file tree
Hide file tree
Showing 20 changed files with 4 additions and 19 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ jobs:
- name: Run lintrunner on all files - Linux
run: |
set +e
if ! lintrunner -v --force-color --all-files --tee-json=lint.json --take ACTIONLINT,MYPY,RUSTFMT,COPYRIGHT,LINTRUNNER_VERSION,UFMT; then
if ! lintrunner -v --force-color --all-files --tee-json=lint.json --take ACTIONLINT,MYPY,RUSTFMT,COPYRIGHT,LINTRUNNER_VERSION,UFMT,NEWLINE; then
echo ""
echo -e "\e[1m\e[36mYou can reproduce these results locally by using \`lintrunner -m main\`.\e[0m"
exit 1
Expand Down
1 change: 0 additions & 1 deletion .github/workflows/tflint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -123,4 +123,3 @@ jobs:
- name: "Run terraform validate terraform-aws-github-runner"
working-directory: terraform-aws-github-runner
run: terraform validate

3 changes: 3 additions & 0 deletions .lintrunner.toml
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,9 @@ exclude_patterns=[
'**/*.ptl',
'**/fixtures/**',
'**/snapshots/**',
'.github/actions/setup-ssh/index.js',
'aws/lambda/log-classifier/data/**',
'tools/clang-tidy-checks/*-patches/**',
]
command = [
'python3',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,4 +55,3 @@ variable "runner_allow_prerelease_binaries" {
type = bool
default = false
}

1 change: 0 additions & 1 deletion tools/rockset_migration/README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
This folder contains tools/scripts used to help with migrating away from Rockset

1 change: 0 additions & 1 deletion tools/self-hosted-runner-utils/list-vpc-dependencies.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,3 @@ aws ec2 describe-vpn-gateways --region $region --filters 'Name=attachment.vpc-id
aws ec2 describe-network-interfaces --region $region --filters 'Name=vpc-id,Values='$vpc | grep NetworkInterfaceId
aws ec2 describe-carrier-gateways --region $region --filters Name=vpc-id,Values=$vpc | grep CarrierGatewayId
aws ec2 describe-local-gateway-route-table-vpc-associations --region $region --filters Name=vpc-id,Values=$vpc | grep LocalGatewayRouteTableVpcAssociationId

1 change: 0 additions & 1 deletion torchci/clickhouse_queries/cost_job_per_gpu/query.sql
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,3 @@ group by
gpu
order by
granularity_bucket asc

Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,3 @@ group by
owning_account
order by
granularity_bucket asc

1 change: 0 additions & 1 deletion torchci/clickhouse_queries/cost_job_per_platform/query.sql
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,3 @@ group by
platform
order by
granularity_bucket asc

1 change: 0 additions & 1 deletion torchci/clickhouse_queries/cost_job_per_provider/query.sql
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,3 @@ group by
rc.provider
order by
granularity_bucket asc

Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,3 @@ group by
runner_type
order by
granularity_bucket asc

Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,3 @@ group by
workflow_name
order by
granularity_bucket asc

1 change: 0 additions & 1 deletion torchci/clickhouse_queries/duration_job_per_gpu/query.sql
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,3 @@ group by
gpu
order by
granularity_bucket asc

Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,3 @@ group by
job_name
order by
granularity_bucket asc

Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,3 @@ group by
owning_account
order by
granularity_bucket asc

Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,3 @@ group by
platform
order by
granularity_bucket asc

Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,3 @@ group by
rc.provider
order by
granularity_bucket asc

1 change: 0 additions & 1 deletion torchci/clickhouse_queries/duration_job_per_repo/query.sql
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,3 @@ group by
repo
order by
granularity_bucket asc

Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,3 @@ group by
runner_type
order by
granularity_bucket asc

Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,3 @@ group by
workflow_name
order by
granularity_bucket asc

0 comments on commit f4a275b

Please sign in to comment.