Skip to content

Commit

Permalink
fixing links and adapting code style docs #2
Browse files Browse the repository at this point in the history
  • Loading branch information
behrisch committed Apr 5, 2024
1 parent 9893dd6 commit 4b6bacf
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 7 deletions.
7 changes: 6 additions & 1 deletion docs/web/docs/Developer/CodeStyle.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,11 @@
title: CodeStyle
---

# Automated style checking

The easiest way to enforce the SUMO code style for C++ and Python
is to enable the [pre-commit checks](GitStuff.md#git-commit-hooks).

# C++ Code

We try to have the code compatible to a wide range of C++11 compatible
Expand Down Expand Up @@ -162,7 +167,7 @@ If your script needs Python 3 then state python3 there.

## Python2 / Python3 compatibility

Our main development focuses on Python 3.5 and later but we strive for
Our main development focuses on Python 3.7 and later but we strive for
Python 2 compatibility. When writing or editing scripts, keep the
following in mind:

Expand Down
9 changes: 6 additions & 3 deletions docs/web/docs/Developer/GitStuff.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,12 @@ pre-commit install
```

It will enable checks for trailing whitespace, LF at the end of every file as well as parsable yaml files
and a maximum file size of 500kb. Every commit which does not pass the tests will fail.
Checks are not performed for the tests directory. Whitespace errors will
be repaired automatically, so that you can issue another commit right afterwards. More checks will probably be added later.
and a maximum file size of 500kb. Furthermore it will do the [style checks](CodeStyle.md) for C++ and Python
using astyle and autopep8. Every commit which does not pass the tests will fail.
Checks are not performed for the tests directory. Style errors will
be repaired automatically, so that you can issue another commit right afterwards
(depending on your tool you might need to stage the changes first).

If you want to run the checks manually without committing,
you can just run `pre-commit`. If you want to check all files (not only the ones which will be part of the commit)
run `pre-commit run --all`.
Expand Down
5 changes: 2 additions & 3 deletions docs/web/docs/Other/Links.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,12 @@ title: Links

### Software Engineering

- [SourceMonitor](https://www.campwoodsw.com/sourcemonitor.html) A
- [SourceMonitor](https://www.derpaul.net/SourceMonitor/) A
great source code metrics tool.

### Configuration Tools

- [Autoconf](ftp://ftp.gnu.org/pub/gnu/autoconf/) Autoconf ftp-site.
- [Automake](ftp://ftp.gnu.org/pub/gnu/automake/) Automake ftp-site.
- [CMake](https://cmake.org/)

## Open Source Traffic Simulation Packages

Expand Down

0 comments on commit 4b6bacf

Please sign in to comment.