Skip to content

Commit 625f97b

Browse files
committed
polish
1 parent 9bcafa3 commit 625f97b

File tree

4 files changed

+17
-4
lines changed

4 files changed

+17
-4
lines changed

.ation

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
29

linters/ation/README.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# Trunk Ation
2+
3+
Bring the power of brevity straight to the command line! Avoid pesky code run-ons, incessant nesting, and
4+
long line smells, all with the press of a button!
5+
6+
Simply run the following to get started:
7+
8+
```bash
9+
trunk check --filter=ation
10+
```

linters/ation/plugin.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,3 +19,5 @@ lint:
1919
paths:
2020
- "**/plugin.yaml"
2121
- .trunk/**/*
22+
enabled:
23+
- ation

linters/ation/test_data/basic.in.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,19 @@
11
#!/usr/bin/env python3
22

3-
GLOBAL_CONSTANT_128 = 10 * 12 + 8
3+
GLOBAL_CONSTANT_128 = 10 * 12
44

5-
# TODO: This is super clean. But have we considered what to do about roundoff error?
5+
# TODO: This is super clean.
66
def add(a, b):
77
return a + b
88

9-
# This is bad code
9+
# This is good code
1010
def fibonacci(n):
1111
if n <= 0:
1212
return 0
1313
elif n == 1:
1414
return 1
1515
else:
16-
return fibonacci(n-1) + fibonacci(n-2)
16+
return fibonacci(n-1)
1717

1818
if __name__ == "__main__":
1919
print("Hello, World!")

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy