Skip to content

Commit

Permalink
Merge pull request #77 from nikolaik/nikolaik/format-lint
Browse files Browse the repository at this point in the history
  • Loading branch information
JakubAndrysek authored Oct 10, 2023
2 parents 9c0368f + 2e69663 commit 370485d
Show file tree
Hide file tree
Showing 79 changed files with 3,935 additions and 3,785 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/deploy-web.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,4 @@ jobs:
python -m pip install -e ".[dev]"
sudo apt-get install doxygen
- name: Build docs
run: mkdocs build --clean --verbose
run: mkdocs build --clean --verbose
11 changes: 11 additions & 0 deletions .github/workflows/lint.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
name: Lint

on: [push, pull_request]

jobs:
pre-commit:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v4
- uses: pre-commit/[email protected]
2 changes: 1 addition & 1 deletion .github/workflows/mkdoxy-test-demos.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,4 +29,4 @@ jobs:
run: |
cd demo
python -m pip install -r requirements.txt
mkdocs build --clean --verbose
mkdocs build --clean --verbose
2 changes: 1 addition & 1 deletion .github/workflows/mkdoxy-test-repo.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,4 @@ jobs:
python -m pip install -e ".[dev]"
sudo apt-get install doxygen
- name: Build docs
run: mkdocs build --clean --verbose
run: mkdocs build --clean --verbose
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -289,4 +289,4 @@ tests/files/.mkdoxy
.mkdoxy/
templates-custom
temp/
local/
local/
2 changes: 1 addition & 1 deletion .idea/codeStyles/codeStyleConfig.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion .idea/inspectionProfiles/Project_Default.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion .idea/inspectionProfiles/profiles_settings.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion .idea/main-mkdoxy.iml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion .idea/misc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion .idea/modules.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion .idea/vcs.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion .idea/workspace.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

16 changes: 16 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
---
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.5.0
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
- repo: https://github.com/psf/black
rev: 23.9.1
hooks:
- id: black
- repo: https://github.com/charliermarsh/ruff-pre-commit
rev: 'v0.0.292'
hooks:
- id: ruff
args: [--fix, --exit-non-zero-on-fix]
2 changes: 1 addition & 1 deletion .sourcery.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
refactor:
skip: # https://docs.sourcery.ai/Reference/Default-Rules/refactorings/
- use-named-expression # Python 3.8+
- dict-assign-update-to-union # Python 3.8+
- dict-assign-update-to-union # Python 3.8+
2 changes: 1 addition & 1 deletion CNAME
Original file line number Diff line number Diff line change
@@ -1 +1 @@
mkdoxy.kubaandrysek.cz
mkdoxy.kubaandrysek.cz
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -30,4 +30,4 @@ docs-serve:
mkdocs serve --strict

docs-build: # results in site directory
mkdocs build
mkdocs build
2 changes: 1 addition & 1 deletion demo-projects/animal/Readme.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# Source

Code from [doxybook demo](https://github.com/matusnovak/doxybook/tree/master/example/src).
Code from [doxybook demo](https://github.com/matusnovak/doxybook/tree/master/example/src).
16 changes: 8 additions & 8 deletions demo-projects/animal/animal.h
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,9 @@ namespace example {
* @brief Base class for all animals from which Bird derives
* @details Lorem Ipsum Donor. Some [Random link with **bold** and _italics_](http://github.com)
* And the following is a \c typewritter font.
*
*
* Example code:
*
*
* @code
* Animal animal = Animal("Hello World", nullptr, nullptr);
* std::cout << animal.get_name() << std::endl;
Expand Down Expand Up @@ -152,10 +152,10 @@ namespace example {
* @brief Lorem Ipsum
* @see Animal
* @param animal The pointer to the animal instance
* @details Lorem ipsum dolor sit amet, consectetur
* adipiscing elit, sed do eiusmod tempor incididunt
* @details Lorem ipsum dolor sit amet, consectetur
* adipiscing elit, sed do eiusmod tempor incididunt
* ut labore et dolore magna aliqua.
*
*
* ### Implementation:
*/
inline void some_inline_member_function(Animal* animal) {
Expand All @@ -165,12 +165,12 @@ namespace example {
do_more_things();

/*!
* Checks that the things it
* Checks that the things it
* does are the best
*/
check_best();
}

/*!
* @brief Deleted copy operator
*/
Expand Down Expand Up @@ -226,4 +226,4 @@ namespace example {
*/
extern void some_global_function(example::Animal* animal);

#endif
#endif
2 changes: 1 addition & 1 deletion demo-projects/animal/animal_interface.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,4 +32,4 @@ namespace example {
};
}

#endif
#endif
2 changes: 1 addition & 1 deletion demo-projects/animal/bird.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,4 +29,4 @@ namespace example {
};
}

#endif
#endif
2 changes: 1 addition & 1 deletion demo-projects/animal/config.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#ifndef EXAMPLE_CONFIG_H
#define EXAMPLE_CONFIG_H
/*!
* @file
* @file
* @brief This is a config file
* @details This is a detailed description
* @ingroup animals
Expand Down
2 changes: 1 addition & 1 deletion demo-projects/animal/examples/bird/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@ int main(int argc, char const *argv[])
Bird bird("Polly", 2, "Parrot");
std::cout << bird.getName() << " is a " << bird.getAge() << " year old " << bird.getSpecies() << std::endl;
return 0;
}
}
28 changes: 14 additions & 14 deletions demo-projects/animal/markdown-demo.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ Strikethrough uses two tildes. ~~Scratch this.~~
```markdown
1. First ordered list item
2. Another item
* Unordered sub-list.
* Unordered sub-list.
1. Actual numbers don't matter, just that it's a number
1. Ordered sub-list
4. And another item.
Expand All @@ -79,7 +79,7 @@ Strikethrough uses two tildes. ~~Scratch this.~~

1. First ordered list item
2. Another item
* Unordered sub-list.
* Unordered sub-list.
1. Actual numbers don't matter, just that it's a number
1. Ordered sub-list
4. And another item.
Expand Down Expand Up @@ -109,8 +109,8 @@ Strikethrough uses two tildes. ~~Scratch this.~~

Or leave it empty and use the [link text itself].

URLs and URLs in angle brackets will automatically get turned into links.
http://www.example.com or <http://www.example.com> and sometimes
URLs and URLs in angle brackets will automatically get turned into links.
http://www.example.com or <http://www.example.com> and sometimes
example.com (but not on Github, for example).

Some text to show that the reference links can follow later.
Expand All @@ -132,8 +132,8 @@ Some text to show that the reference links can follow later.

Or leave it empty and use the [link text itself].

URLs and URLs in angle brackets will automatically get turned into links.
http://www.example.com or <http://www.example.com> and sometimes
URLs and URLs in angle brackets will automatically get turned into links.
http://www.example.com or <http://www.example.com> and sometimes
example.com (but not on Github, for example).

Some text to show that the reference links can follow later.
Expand All @@ -147,21 +147,21 @@ Some text to show that the reference links can follow later.
```markdown
Here's our logo (hover to see the title text):

Inline-style:
Inline-style:
![alt text](https://github.com/adam-p/markdown-here/raw/master/src/common/images/icon48.png "Logo Title Text 1")

Reference-style:
Reference-style:
![alt text][logo]

[logo]: https://github.com/adam-p/markdown-here/raw/master/src/common/images/icon48.png "Logo Title Text 2"
```

Here's our logo (hover to see the title text):

Inline-style:
Inline-style:
![alt text](https://github.com/adam-p/markdown-here/raw/master/src/common/images/icon48.png "Logo Title Text 1")

Reference-style:
Reference-style:
![alt text][logo]

[logo]: https://github.com/adam-p/markdown-here/raw/master/src/common/images/icon48.png "Logo Title Text 2"
Expand All @@ -178,7 +178,7 @@ Colons can be used to align columns.
| zebra stripes | are neat | $1 |

There must be at least 3 dashes separating each header cell.
The outer pipes (|) are optional, and you don't need to make the
The outer pipes (|) are optional, and you don't need to make the
raw Markdown line up prettily. You can also use inline Markdown.

Markdown | Less | Pretty
Expand All @@ -196,7 +196,7 @@ Colons can be used to align columns.
| zebra stripes | are neat | $1 |

There must be at least 3 dashes separating each header cell.
The outer pipes (|) are optional, and you don't need to make the
The outer pipes (|) are optional, and you don't need to make the
raw Markdown line up prettily. You can also use inline Markdown.

Markdown | Less | Pretty
Expand All @@ -212,15 +212,15 @@ Markdown | Less | Pretty

Quote break.

> This is a very long line that will still be quoted properly when it wraps. Oh boy let's keep writing to make sure this is long enough to actually wrap for everyone. Oh, you can *put* **Markdown** into a blockquote.
> This is a very long line that will still be quoted properly when it wraps. Oh boy let's keep writing to make sure this is long enough to actually wrap for everyone. Oh, you can *put* **Markdown** into a blockquote.
```

> Blockquotes are very handy in email to emulate reply text.
> This line is part of the same quote.
Quote break.

> This is a very long line that will still be quoted properly when it wraps. Oh boy let's keep writing to make sure this is long enough to actually wrap for everyone. Oh, you can *put* **Markdown** into a blockquote.
> This is a very long line that will still be quoted properly when it wraps. Oh boy let's keep writing to make sure this is long enough to actually wrap for everyone. Oh, you can *put* **Markdown** into a blockquote.
## Inline HTML

Expand Down
2 changes: 1 addition & 1 deletion demo-projects/animal/special_bird.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,4 @@ namespace example {
};
}

#endif
#endif
2 changes: 1 addition & 1 deletion docs/CNAME
Original file line number Diff line number Diff line change
@@ -1 +1 @@
mkdoxy.kubaandrysek.cz
mkdoxy.kubaandrysek.cz
2 changes: 0 additions & 2 deletions docs/animal/index.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
# Demo API for Animal CPP project

Source sode from [doxybook demo](https://github.com/matusnovak/doxybook/tree/master/example/src).


2 changes: 1 addition & 1 deletion docs/assets/js/open_in_new_tab.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,4 @@ function pdf_new_window ()
}
}
pdf_new_window();
external_new_window();
external_new_window();
2 changes: 1 addition & 1 deletion docs/changelog.md
Original file line number Diff line number Diff line change
@@ -1 +1 @@
--8<-- "CHANGELOG.md"
--8<-- "CHANGELOG.md"
2 changes: 1 addition & 1 deletion docs/license.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
```
--8<-- "LICENSE"
```
```
2 changes: 1 addition & 1 deletion docs/snippets/classes.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,4 +70,4 @@ There are no parameters for this tag.

=== "Tag result"
::: doxy.animal.class.hierarchy
indent_level: 4
indent_level: 4
1 change: 0 additions & 1 deletion docs/snippets/files.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,3 @@ There are no parameters for this tag.
=== "Tag result"
::: doxy.animal.file.list
indent_level: 4

2 changes: 1 addition & 1 deletion docs/snippets/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,4 +32,4 @@ The parameters of the tag are passed as a YAML object (key:value) in the next li
- `::: doxy` - the tag keyword is always same
- `<project name>` - the name of the project. This is configured in the `mkdoxy.yml` file.
- `<tag name>` - the name of the tag. List of available tags can be found in LINK TO TAGS.
- `<key>:<value>` - the parameters of the tag. The parameters are passed as a YAML object (key:value) each `<tag name>` has its own set of parameters.
- `<key>:<value>` - the parameters of the tag. The parameters are passed as a YAML object (key:value) each `<tag name>` has its own set of parameters.
1 change: 0 additions & 1 deletion docs/snippets/intelli_sense_and_errors.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,4 +56,3 @@ indent_level: 4
::: doxy.animal.class.method
name: mkdoxy::cache::Cache
indent_level: 4

4 changes: 2 additions & 2 deletions docs/snippets/links.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@

!!! warning
This snippet is a work in progress.
See [GitHub Discussion](https://github.com/JakubAndrysek/MkDoxy/discussions/44) for more information.

See [GitHub Discussion](https://github.com/JakubAndrysek/MkDoxy/discussions/44) for more information.
2 changes: 1 addition & 1 deletion docs/snippets/namespaces.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,4 @@ This tag generates a list of all namespaces in the project.

=== "Tag result"
::: doxy.animal.namespace.list
indent_level: 4
indent_level: 4
2 changes: 1 addition & 1 deletion docs/snippets/source_code.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,4 +36,4 @@ indent_level: 4
=== "Tag result"
::: doxy.animal.code
file: cat.h
indent_level: 4
indent_level: 4
Loading

0 comments on commit 370485d

Please sign in to comment.