Skip to content

Commit 538bdea

Browse files
committed
Rename .styleguide configs to .wpiformat to match tool name
1 parent 6eed30a commit 538bdea

File tree

12 files changed

+27
-27
lines changed

12 files changed

+27
-27
lines changed

.github/workflows/ci.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -88,8 +88,8 @@ jobs:
8888
rm -rf branch-test
8989
mkdir branch-test && cd branch-test && git init
9090
git checkout -b master
91-
touch .styleguide
92-
git add .styleguide && git commit -q -m "Initial commit"
91+
touch .wpiformat
92+
git add .wpiformat && git commit -q -m "Initial commit"
9393
wpiformat
9494
9595
# Verify wpiformat reports success if "main" exists
@@ -99,8 +99,8 @@ jobs:
9999
rm -rf branch-test
100100
mkdir branch-test && cd branch-test && git init
101101
git checkout -b main
102-
touch .styleguide
103-
git add .styleguide && git commit -q -m "Initial commit"
102+
touch .wpiformat
103+
git add .wpiformat && git commit -q -m "Initial commit"
104104
wpiformat
105105
106106
- name: Delete branch-test folder

.styleguide renamed to .wpiformat

File renamed without changes.
File renamed without changes.

wpiformat/README.rst

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -22,14 +22,14 @@ On Linux/OSX, execute::
2222
Project Setup
2323
*************
2424

25-
To use these tools with a new project, copy `.styleguide`_, and `.styleguide-license`_ from the examples folder into the project and create a new ``.clang-format`` file based on the desired C/C++ style.
25+
To use these tools with a new project, copy `.wpiformat`_, and `.wpiformat-license`_ from the examples folder into the project and create a new ``.clang-format`` file based on the desired C/C++ style.
2626

2727
Note: Since wpiformat already handles include ordering, it is recommended to use ``SortIncludes: false`` in ``.clang-format``.
2828

29-
.styleguide
30-
-----------
29+
.wpiformat
30+
----------
3131

32-
wpiformat checks the current directory for the ``.styleguide`` file. If one doesn't exist, all parent directories are tried as well. See the ``.styleguide`` file in the docs/examples directory for all possible groups.
32+
wpiformat checks the current directory for the ``.wpiformat`` file. If one doesn't exist, all parent directories are tried as well. See the ``.wpiformat`` file in the docs/examples directory for all possible groups.
3333

3434
This file contains groups of file name regular expressions. There are two groups of regexes which prevent tasks (i.e., formatters and linters) from running on matching files:
3535

@@ -54,12 +54,12 @@ The regex for C system headers produces false positives on headers from "other l
5454

5555
``NOLINT`` can be appended in a comment to a header include to prevent wpiformat's header include sorter from modifying it and to maintain its relative ordering with other header includes. This will, in effect, treat it as a barrier across which no header includes will be moved. Header includes on each side of the barrier will still be sorted as normal.
5656

57-
.styleguide-license
58-
-------------------
57+
.wpiformat-license
58+
------------------
5959

60-
This file contains the license header template. It should contain ``Copyright (c)`` followed by the company name and the string ``{year}``. See the ``.styleguide-license`` file in the docs/examples directory.
60+
This file contains the license header template. It should contain ``Copyright (c)`` followed by the company name and the string ``{year}``. See the ``.wpiformat-license`` file in the docs/examples directory.
6161

62-
wpiformat checks the currently processed file's directory for a ``.styleguide`` file first and traverses up the directory tree if one isn't found. This allows templates which are closer to the processed file to override a project's main template.
62+
wpiformat checks the currently processed file's directory for a ``.wpiformat`` file first and traverses up the directory tree if one isn't found. This allows templates which are closer to the processed file to override a project's main template.
6363

6464
The license header is always at the beginning of the file and ends after two newlines. If there isn't one, or it doesn't contain the required copyright contents, wpiformat inserts a new one containing the current year.
6565

File renamed without changes.

wpiformat/wpiformat/__init__.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ def proc_pipeline(name):
8686
Keyword arguments:
8787
name -- file name string
8888
"""
89-
config_file = Config(os.path.dirname(name), ".styleguide")
89+
config_file = Config(os.path.dirname(name), ".wpiformat")
9090
if verbose1 or verbose2:
9191
with print_lock:
9292
print("Processing", name)
@@ -128,7 +128,7 @@ def proc_standalone(name):
128128
Keyword arguments:
129129
name -- file name string
130130
"""
131-
config_file = Config(os.path.dirname(name), ".styleguide")
131+
config_file = Config(os.path.dirname(name), ".wpiformat")
132132
if verbose2:
133133
with print_lock:
134134
print("Processing", name)
@@ -178,7 +178,7 @@ def proc_batch(files):
178178
for subtask in task_pipeline:
179179
work = []
180180
for name in files:
181-
config_file = Config(os.path.dirname(name), ".styleguide")
181+
config_file = Config(os.path.dirname(name), ".wpiformat")
182182
if subtask.should_process_file(config_file, name):
183183
work.append(name)
184184

@@ -443,7 +443,7 @@ def main():
443443
# Don't run tasks on modifiable or generated files
444444
work = []
445445
for name in files:
446-
config_file = Config(os.path.dirname(name), ".styleguide")
446+
config_file = Config(os.path.dirname(name), ".wpiformat")
447447

448448
if config_file.is_modifiable_file(name):
449449
continue

wpiformat/wpiformat/licenseupdate.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ def run_pipeline(self, config_file, name, lines):
136136
linesep = super().get_linesep(lines)
137137

138138
_, license_template = Config.read_file(
139-
os.path.dirname(os.path.abspath(name)), ".styleguide-license"
139+
os.path.dirname(os.path.abspath(name)), ".wpiformat-license"
140140
)
141141

142142
# Get year when file was most recently modified in Git history

wpiformat/wpiformat/lint.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,10 @@ def should_process_file(config_file, name):
2222

2323
@staticmethod
2424
def run_batch(config_file, names):
25-
# Handle running in either the root or styleguide directories
25+
# Handle running in either the root or wpiformat directories
2626
cpplintPrefix = ""
27-
if os.getcwd().rpartition(os.sep)[2] != "styleguide":
28-
cpplintPrefix = "styleguide/"
27+
if os.getcwd().rpartition(os.sep)[2] != "wpiformat":
28+
cpplintPrefix = .wpiformat/"
2929

3030
# Prepare arguments to cpplint.py
3131
saved_argv = sys.argv

wpiformat/wpiformat/test/test_config.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55

66
def test_config():
7-
config_file = Config(os.path.abspath(os.getcwd()), ".styleguide")
7+
config_file = Config(os.path.abspath(os.getcwd()), ".wpiformat")
88
assert config_file.is_modifiable_file(
99
"." + os.sep + "wpiformat" + os.sep + "javaguidelink.png"
1010
)

0 commit comments

Comments
 (0)