Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add markdown checks (and fix some markdown issues) #6524

Merged
merged 13 commits into from
May 27, 2020
21 changes: 21 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -216,3 +216,24 @@ jobs:
steps:
- uses: actions/checkout@v2
- uses: gradle/wrapper-validation-action@v1
markdown-link-check:
runs-on: ubuntu-latest
steps:
- name: Set up Git repository
uses: actions/checkout@v2
- uses: gaurav-nelson/github-action-markdown-link-check@v1
with:
use-quiet-mode: 'yes'
use-verbose-mode: 'yes'
config-file: 'mlc_config.json'
folder-path: 'docs/'
markdown-lint-check:
koppor marked this conversation as resolved.
Show resolved Hide resolved
runs-on: ubuntu-latest
steps:
- name: Set up Git repository
uses: actions/checkout@v2
- name: Lint all files
uses: avto-dev/markdown-lint@v1
with:
args: 'docs/ CHANGELOG.md README.md'
config: '.markdownlint.yml'
18 changes: 18 additions & 0 deletions .markdownlint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
default: true

# Using h2 has side effects in GitBook's toc. Thus, we sometimes switch from h1 to h3
MD001: false

MD012:
# 2 are required, because GitBook adss two blank lines at the end of a file
maximum: 2

MD013: false

# The FAQs state questions - we allow them
MD026:
punctuation: ".,;:!"

MD033:
# we have <a> tags with ids
allowed_elements: ['a']
5 changes: 3 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,7 @@ Note that this project **does not** adhere to [Semantic Versioning](http://semve
- We fixed an issue where the blue and red text colors in the Merge entries dialog were not quite visible [#6334](https://github.com/JabRef/jabref/issues/6334)
- We fixed an issue where underscore character was removed from the file name in the Recent Libraries list in File menu [#6383](https://github.com/JabRef/jabref/issues/6383)
- We fixed an issue where few keyboard shortcuts regarding new entries were missing [#6403](https://github.com/JabRef/jabref/issues/6403)

### Removed

- Ampersands are no longer escaped by default in the `bib` file. If you want to keep the current behaviour, you can use the new "Escape Ampersands" formatter as a save action. [#5869](https://github.com/JabRef/jabref/issues/5869)
Expand Down Expand Up @@ -302,8 +303,8 @@ Note that this project **does not** adhere to [Semantic Versioning](http://semve
- We fixed an issue where some journal names were wrongly marked as abbreviated. [#4115](https://github.com/JabRef/jabref/issues/4115)
- We fixed an issue where the custom file column were sorted incorrectly. [#3119](https://github.com/JabRef/jabref/issues/3119)
- We improved the parsing of author names whose infix is abbreviated without a dot. [#4864](https://github.com/JabRef/jabref/issues/4864)
- We fixed an issues where the entry losses focus when a field is edited and at the same time used for sorting. https://github.com/JabRef/jabref/issues/3373
- We fixed an issue where the menu on Mac OS was not displayed in the usual Mac-specific way. https://github.com/JabRef/jabref/issues/3146
- We fixed an issues where the entry losses focus when a field is edited and at the same time used for sorting. [#3373](https://github.com/JabRef/jabref/issues/3373)
- We fixed an issue where the menu on Mac OS was not displayed in the usual Mac-specific way. [#3146](https://github.com/JabRef/jabref/issues/3146)
- We improved the integrity check for page numbers. [#4113](https://github.com/JabRef/jabref/issues/4113) and [feature request in the forum](http://discourse.jabref.org/t/pages-field-allow-use-of-en-dash/1199)
- We fixed an issue where the order of fields in customized entry types was not saved correctly. [#4033](http://github.com/JabRef/jabref/issues/4033)
- We fixed an issue where renaming a group did not change the group name in the interface. [#3189](https://github.com/JabRef/jabref/issues/3189)
Expand Down
1 change: 1 addition & 0 deletions docs/adr/0004-use-mariadb-connector.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,3 +30,4 @@ The [MySQL Connector](https://www.mysql.com/de/products/connector/) is distribut
* Good, because it stems from the same development team than MySQL
* Bad, because the "Universal FOSS Exception" makes licensing more complicated.

<!-- markdownlint-disable-file MD024 -->
1 change: 1 addition & 0 deletions docs/adr/0006-only-translated-strings-in-language-file.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,3 +44,4 @@ Chosen option: "Only translated strings in language file", because comes out bes

* Related to [ADR-0001](0001-use-crowdin-for-translations.md).

<!-- markdownlint-disable-file MD024 -->
28 changes: 14 additions & 14 deletions docs/adr/template.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
# \[short title of solved problem and solution\]

* Status: \[proposed \| rejected \| accepted \| deprecated \| … \| superseded by [ADR-0005](https://github.com/JabRef/jabref/tree/8c07a88a823a84aebe987cdb717f318ed00a872d/docs/adr/0005-example.md)\]
* Deciders: \[list everyone involved in the decision\]
* Date: \[YYYY-MM-DD when the decision was last updated\]
* Status: \[proposed \| rejected \| accepted \| deprecated \| … \| superseded by [ADR-0005](https://github.com/JabRef/jabref/tree/8c07a88a823a84aebe987cdb717f318ed00a872d/docs/adr/0005-example.md)\]
* Deciders: \[list everyone involved in the decision\]
* Date: \[YYYY-MM-DD when the decision was last updated\]

Technical Story: \[description \| ticket/issue URL\]
Technical Story: \[description \| ticket/issue URL\]

## Context and Problem Statement

Expand All @@ -14,14 +14,14 @@ Technical Story: \[description \| ticket/issue URL\]

* \[driver 1, e.g., a force, facing concern, …\]
* \[driver 2, e.g., a force, facing concern, …\]
* …
* …

## Considered Options

* \[option 1\]
* \[option 2\]
* \[option 3\]
* …
* …

## Decision Outcome

Expand All @@ -41,33 +41,33 @@ Chosen option: "\[option 1\]", because \[justification. e.g., only option, which

### \[option 1\]

\[example \| description \| pointer to more information \| …\]
\[example \| description \| pointer to more information \| …\]

* Good, because \[argument a\]
* Good, because \[argument b\]
* Bad, because \[argument c\]
* …
* …

### \[option 2\]

\[example \| description \| pointer to more information \| …\]
\[example \| description \| pointer to more information \| …\]

* Good, because \[argument a\]
* Good, because \[argument b\]
* Bad, because \[argument c\]
* …
* …

### \[option 3\]

\[example \| description \| pointer to more information \| …\]
\[example \| description \| pointer to more information \| …\]

* Good, because \[argument a\]
* Good, because \[argument b\]
* Bad, because \[argument c\]
* …
* …

## Links

* \[Link type\] \[Link to ADR\]
* …
* \[Link type\] \[Link to ADR\]
* …

3 changes: 2 additions & 1 deletion docs/code-howtos.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ Principles:
Localization.lang("Something went wrong...", ioe);
}
```

* Never, ever throw and catch `Exception` or `Throwable`
* Errors should only be logged when they are finally caught \(i.e., logged only once\). See **Logging** for details.
* If the Exception message is intended to be shown to the User in the UI \(see below\) provide also a localizedMessage \(see `JabRefException`\).
Expand All @@ -45,7 +46,7 @@ To show error message two different ways are usually used in JabRef:
* showing an error dialog
* updating the status bar at the bottom of the main window

_TODO: Usage of status bar and Swing Dialogs_
_*TODO: Usage of status bar and Swing Dialogs*_

## Using the EventSystem

Expand Down
2 changes: 1 addition & 1 deletion docs/javafx.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ JabRef's recommendations about JavaFX
The goal of the MVVM architecture is to separate the state/behavior from the appearance of the ui. This is archived by dividing JabRef into different layers, each having a clear responsibility.

* The _Model_ contains the business logic and data structures. These aspects are again encapsulated in the _logic_ and _model_ package, respectively.
* The _View_ controls the appearance and structure of the UI. It is usually defined in a _FXML_ file.
* The _View_ controls the appearance and structure of the UI. It is usually defined in a _FXML_ file.
* _View model_ converts the data from logic and model in a form that is easily usable in the gui. Thus it controls the state of the View. Moreover, the ViewModel contains all the logic needed to change the current state of the UI or perform an action. These actions are usually passed down to the _logic_ package, after some data validation. The important aspect is that the ViewModel contains all the ui-related logic but does _not_ have direct access to the controls defined in the View. Hence, the ViewModel can easily be tested by unit tests.
* The _Controller_ initializes the view model and binds it to the view. In an ideal world all the binding would already be done directly in the FXML. But JavaFX's binding expressions are not yet powerful enough to accomplish this. It is important to keep in mind that the Controller should be as minimalistic as possible. Especially one should resist the temptation to validate inputs in the controller. The ViewModel should handle data validation! It is often convenient to load the FXML file directly from the controller.

Expand Down
11 changes: 6 additions & 5 deletions docs/teaching.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ Course: Open Source Software Development

Course [CS499 - Open Source Software Development](https://github.com/igorsteinmacher/CS499-OSS)

- Summary: Students experience the process of getting involved in an Open Source project by engaging with a real project. Their goal is to make a "substantial" contribution to a project.
- Summary: Students experience the process of getting involved in an Open Source project by engaging with a real project. Their goal is to make a "substantial" contribution to a project.
- Course offered in 2018

### German
Expand Down Expand Up @@ -122,12 +122,13 @@ Course [Open Source Software](https://github.com/igorsteinmacher/DSL-UTFPR)

## Interesting Read for Students and Advisors

- [Developing Procrastination Feedback for Student Software Developers](https://medium.com/@ayaankazerouni/developing-procrastination-feedback-for-student-software-developers-1652de60db7f) by [@ayaankazerouni](https://github.com/ayaankazerouni?tab=overview&from=2015-12-01&to=2015-12-31)
- [Developing Procrastination Feedback for Student Software Developers](https://medium.com/@ayaankazerouni/developing-procrastination-feedback-for-student-software-developers-1652de60db7f) by [@ayaankazerouni](https://github.com/ayaankazerouni?tab=overview&from=2015-12-01&to=2015-12-31)

> When students worked earlier and more often, they produced projects that:
>
> - were more correct,
> - were completed earlier,
> - took no more or less time to complete
> - were more correct,
> - were completed earlier,
> - took no more or less time to complete

## References

Expand Down
10 changes: 10 additions & 0 deletions mlc_config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"ignorePatterns": [
{
"pattern": "^https://dl\\.acm\\.org"
},
{
"pattern": "^http://purl\\.org/net/bibteXMP"
}
]
}