Skip to content

Commit 9cec0e0

Browse files
committed
Rename .styleguide configs to .wpiformat to match tool name
1 parent 7c04d3b commit 9cec0e0

File tree

11 files changed

+24
-24
lines changed

11 files changed

+24
-24
lines changed

.github/workflows/ci.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -90,8 +90,8 @@ jobs:
9090
rm -rf branch-test
9191
mkdir branch-test && cd branch-test && git init
9292
git checkout -b master
93-
touch .styleguide
94-
git add .styleguide && git commit -q -m "Initial commit"
93+
touch .wpiformat
94+
git add .wpiformat && git commit -q -m "Initial commit"
9595
wpiformat
9696
9797
# Verify wpiformat reports success if "main" exists
@@ -101,8 +101,8 @@ jobs:
101101
rm -rf branch-test
102102
mkdir branch-test && cd branch-test && git init
103103
git checkout -b main
104-
touch .styleguide
105-
git add .styleguide && git commit -q -m "Initial commit"
104+
touch .wpiformat
105+
git add .wpiformat && git commit -q -m "Initial commit"
106106
wpiformat
107107
108108
- 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
@@ -87,7 +87,7 @@ def proc_pipeline(name):
8787
Keyword arguments:
8888
name -- file name string
8989
"""
90-
config_file = Config(os.path.dirname(name), ".styleguide")
90+
config_file = Config(os.path.dirname(name), ".wpiformat")
9191
if verbose1 or verbose2:
9292
with print_lock:
9393
print("Processing", name)
@@ -129,7 +129,7 @@ def proc_standalone(name):
129129
Keyword arguments:
130130
name -- file name string
131131
"""
132-
config_file = Config(os.path.dirname(name), ".styleguide")
132+
config_file = Config(os.path.dirname(name), ".wpiformat")
133133
if verbose2:
134134
with print_lock:
135135
print("Processing", name)
@@ -179,7 +179,7 @@ def proc_batch(files):
179179
for subtask in task_pipeline:
180180
work = []
181181
for name in files:
182-
config_file = Config(os.path.dirname(name), ".styleguide")
182+
config_file = Config(os.path.dirname(name), ".wpiformat")
183183
if subtask.should_process_file(config_file, name):
184184
work.append(name)
185185

@@ -480,7 +480,7 @@ def main():
480480
# Don't run tasks on modifiable or generated files
481481
work = []
482482
for name in files:
483-
config_file = Config(os.path.dirname(name), ".styleguide")
483+
config_file = Config(os.path.dirname(name), ".wpiformat")
484484

485485
if config_file.is_modifiable_file(name):
486486
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/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
)

wpiformat/wpiformat/test/test_licenseupdate.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -307,20 +307,20 @@ def test_licenseupdate():
307307
)
308308

309309
# Ensure excluded files won't be processed
310-
config_file = Config(os.path.abspath(os.getcwd()), ".styleguide")
310+
config_file = Config(os.path.abspath(os.getcwd()), ".wpiformat")
311311
assert not task.should_process_file(config_file, "./Excluded.h")
312312

313313
# Create git repo to test license years for commits
314314
with OpenTemporaryDirectory():
315315
subprocess.run(["git", "init", "-q"])
316316

317317
# Add base files
318-
with open(".styleguide-license", "w") as file:
318+
with open(".wpiformat-license", "w") as file:
319319
file.write("// Copyright (c) {year}")
320-
with open(".styleguide", "w") as file:
320+
with open(".wpiformat", "w") as file:
321321
file.write("cppSrcFileInclude {\n" + r"\.cpp$")
322-
subprocess.run(["git", "add", ".styleguide-license"])
323-
subprocess.run(["git", "add", ".styleguide"])
322+
subprocess.run(["git", "add", ".wpiformat-license"])
323+
subprocess.run(["git", "add", ".wpiformat"])
324324
subprocess.run(["git", "commit", "-q", "-m", '"Initial commit"'])
325325

326326
# Add file with commit date of last year and range through this year

0 commit comments

Comments
 (0)