Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 0 additions & 10 deletions .github/workflows/markdownlint.yml

This file was deleted.

28 changes: 28 additions & 0 deletions .github/workflows/pre-commit.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: pre-commit
on: [pull_request, push]
jobs:
pre-commit:
name: pre-commit checks
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7

- name: Set up Python
uses: actions/setup-python@ece7cb06caefa5fff74198d8649806c4678c61a1 # v6
with:
python-version: "3.14"

- name: Cache pre-commit environments
uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6
with:
path: ~/.cache/pre-commit
key: pre-commit-${{ runner.os }}-${{ hashFiles('.pre-commit-config.yaml') }}

- name: Install pre-commit
run: python -m pip install "pre-commit==4.6.1"

- name: Run pre-commit
run: pre-commit run --all-files --show-diff-on-failure --color=always

11 changes: 11 additions & 0 deletions .markdownlint.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"MD007": { "indent": 4 },
"MD012": false,
"MD013": { "line_length": 999 },
"MD032": false,
"MD033": false,
"MD034": false,
"MD041": false,
"MD045": false,
"MD060": false
}
7 changes: 7 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
repos:
- repo: https://github.com/igorshubovych/markdownlint-cli
rev: v0.49.1
hooks:
- id: markdownlint
- id: markdownlint-fix

2 changes: 1 addition & 1 deletion 01_version_control/git_quiz.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ cat motivation.txt
- `Documenting major milestones.`
- The following:

```
```text
Sharing information about myself.
Documenting major milestones.
```
Expand Down
2 changes: 1 addition & 1 deletion 01_version_control/merge_rebase_slides.md
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ slideOptions:

- `git log`

```
```text
3e70cb5 8 seconds .. Merge branch 'feature' HEAD -> main
607a08a 18 seconds.. E feature
2e4f61f 28 seconds.. C
Expand Down
10 changes: 5 additions & 5 deletions 01_version_control/my_favorite_neat_little_git_trick_demo.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
- GitHub uses [gitignore templates](https://github.com/github/gitignore) if you create a `.gitignore` file from GitHub
- To get a nice compact `git log`, you can add the following to your `gitconfig`:

```
```rc
[format]
pretty = format:%C(auto,yellow)%h %C(auto,blue)%>(12,trunc)%ad %C(auto,green)%<(20,trunc)%aN%C(auto,reset)%s%C(auto,red)% gD% D
```
Expand All @@ -24,7 +24,7 @@
- Prefer `git add -p` over `git add [FILE]`. This allows you to specify what you want to add to a commit in a more fine-grained manner
- A very nice alias for editing any earlier commit, without having to manually rebase:

```
```rc
[alias]
amend = "!f() { \
COMMIT=$(git rev-parse --short \"$1\") && \
Expand All @@ -45,7 +45,7 @@
- GitHub uses [gitignore templates](https://github.com/github/gitignore) if you create a `.gitignore` file from GitHub
- To get a nice compact `git log`, you can add the following to your `gitconfig`:

```
```rc
[format]
pretty = format:%C(auto,yellow)%h %C(auto,blue)%>(12,trunc)%ad %C(auto,green)%<(20,trunc)%aN%C(auto,reset)%s%C(auto,red)% gD% D
```
Expand Down Expand Up @@ -76,7 +76,7 @@
- GitHub uses [gitignore templates](https://github.com/github/gitignore) if you create a `.gitignore` file from GitHub
- To get a nice compact `git log`, you can add the following to your `gitconfig`:

```
```rc
[format]
pretty = format:%C(auto,yellow)%h %C(auto,blue)%>(12,trunc)%ad %C(auto,green)%<(20,trunc)%aN%C(auto,reset)%s%C(auto,red)% gD% D
```
Expand All @@ -93,7 +93,7 @@

### A helpful git config

```
```rc
[push]
default = simple
autoSetupRemote = true
Expand Down
10 changes: 5 additions & 5 deletions 01_version_control/standards_slides.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,12 +73,12 @@ Certain files lead to special formatting (normally directly at root of repo):
## Special Files (3)

- `CITATION.cff`
- ... contains preferred citation details.
- ... gets rendered on the sidebar.
- ... export to BibTeX.
- ... contains preferred citation details.
- ... gets rendered on the sidebar.
- ... export to BibTeX.
- `AGENTS.md`
- ... contains context and instructions for GenAI.
- ... more and more coding agents read it.
- ... contains context and instructions for GenAI.
- ... more and more coding agents read it.


---
Expand Down
4 changes: 3 additions & 1 deletion 03_building_and_packaging/make_demo.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,8 @@ int main()

`Makefile`:

<!-- markdownlint-configure-file {"MD010": false } -->

```makefile
sse.o : sse/sse.hpp sse/sse.cpp
$(CXX) -c sse/sse.cpp
Expand Down Expand Up @@ -72,7 +74,7 @@ helloworld : main.cpp sse.o
- `mkdir clean` and `make clean` confuses Make.
- phony target (a helper target, doesn't correspond to a file)

```
```makefile
+ .PHONY : all clean
```

Expand Down
2 changes: 1 addition & 1 deletion 04_documentation/examples/pandoc/example.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ author: Firstname lastname
date: 2026-01-07
---

# Introduction
## Introduction

This is text, **bold text**, *italic text*, and `inline code`.

Expand Down
2 changes: 2 additions & 0 deletions 04_documentation/technical_writing_slides.md
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,8 @@ a community of technical writers.

## Documentation Content Should Be

<!-- markdownlint-configure-file {"MD059": false } -->

- **ARID** (*"Accept (some) Repetition in Documentation"*)
- Not like good code (**DRY**: *"don't repeat yourself"*),
but also not **WET**
Expand Down
2 changes: 1 addition & 1 deletion 05_testing_and_ci/boost_testing_intro_slides.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ If you know one, the next one is easy to learn.
- [CppUnit](http://sourceforge.net/apps/mediawiki/cppunit/index.php?title=Main_Page)
- [Cute](http://www.cute-test.com/)
- [GoogleTest](http://code.google.com/p/googletest/)
- [More](https://en.wikipedia.org/wiki/List_of_unit_testing_frameworks#C.2B.2B)
- [More testing frameworks](https://en.wikipedia.org/wiki/List_of_unit_testing_frameworks#C.2B.2B)

---

Expand Down
2 changes: 1 addition & 1 deletion 06_miscellaneous/floss_licenses_slides.md
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ Focus on big picture: There are mainly **three types**:

... so simple, we can actually read and mostly understand it:

```
```text
Copyright (c) [year] [fullname]

Permission is hereby granted, free of charge, to any person obtaining a copy
Expand Down
10 changes: 6 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Simulation Software Engineering Lecture Material

![markdownlint](https://github.com/Simulation-Software-Engineering/lecture-materials/actions/workflows/markdownlint.yml/badge.svg)
![pre-commit](https://github.com/Simulation-Software-Engineering/lecture-materials/actions/workflows/pre-commit.yml/badge.svg)
[![PDFs](https://github.com/Simulation-Software-Engineering/lecture-materials/actions/workflows/create-pdfs-from-markdown.yml/badge.svg)](https://github.com/Simulation-Software-Engineering/Lecture-Material/actions/workflows/create-pdfs-from-markdown.yml)
[![CC BY 4.0][cc-by-shield]][cc-by]

Expand All @@ -22,10 +22,12 @@ Please note that we update the material over the course of each semester.

## Linting

The markdown files can be checked using [markdownlint](https://github.com/markdownlint/markdownlint/). Once the linter is installed, run it locally from the root of this repository using
The markdown files can be checked using [markdownlint](https://github.com/markdownlint/markdownlint/), which is automatically being called from [pre-commit](https://pre-commit.com/):

```
mdl .
```shell
pipx install pre-commit # Install pre-commit as a tool
pre-commit install # Install/enable pre-commit in the specific repository
pre-commit run -a # Run all pre-commit hooks (not necessary, automatically when committing)
```

It will automatically read the markdownlint configuration of this repository. The linter is configured in the files `.mdl.rb` and `.mdlrc`. The majority of the configuration is done in `.mdl.rb`.
Expand Down
2 changes: 2 additions & 0 deletions docs/styleguide.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,8 @@ Example:

## Links

<!-- markdownlint-configure-file {"MD059": false } -->

- Do not use [click here](https://www.smashingmagazine.com/2012/06/links-should-never-say-click-here/) links.

## Slides
Expand Down
9 changes: 6 additions & 3 deletions timetable.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
# Timetable

<!-- markdownlint-configure-file {"MD013": { "tables": false } } -->
<!-- markdownlint-configure-file {"MD013": { "line_length": 999 } } -->

| Week | Date | Type | Description | Lecturer |
| --- | --- | --- | --- | --- |
| [1](#week-1) | 14.10. | 🧑‍🏫 | Course intro, intro to SSE, VC basics | Gerasimos |
Expand All @@ -26,9 +29,9 @@
| | | 🎉 | Student presentations: Challenge - step 2 | |
| | | 🎉 | Student presentations: Challenge - step 2 | |
| | | ⚠️ | **Deadline:** Suggest a Challenge contribution | |
| - | 23.12. | 🎄 | _Christmas break_ | |
| - | 30.12. | 🎄 | _Christmas break_ | |
| - | 06.01. | 🎄 | _Christmas break_ | |
| - | 23.12. | 🎄 | *Christmas break* | |
| - | 30.12. | 🎄 | *Christmas break* | |
| - | 06.01. | 🎄 | *Christmas break* | |
| [11](#week-11) | 13.01. | 🧑‍🏫 | Intro testing, testing in Python | Felix |
| | | 💻️ | Testing in Python | Felix |
| [12](#week-12) | 20.01. | 🧑‍🏫 | Markup, Pandoc, website gener. | Felix |
Expand Down
Loading