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 FAQ to devdocs (Code Howtos) #11456

Merged
merged 3 commits into from
Jul 8, 2024
Merged
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
20 changes: 20 additions & 0 deletions docs/code-howtos/faq.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
---
parent: Code Howtos
---
# Frequently Asked Questions (FAQ)

## Resolving common development errors

Following is a list of common errors encountered by developers which lead to failing tests, with their common solutions:

* `org.jabref.architecture.MainArchitectureTest` `restrictStandardStreams` <span style="color:red">FAILED</span>
* <span style="color:green">Fix</span> : Check if you've used ```System.out.println(...)``` (the standard output stream) to log anything into the console. This is an architectural violation, as you should use the Logger instead for logging. More details on how to log can be found [here](https://devdocs.jabref.org/code-howtos/logging.html).

* `org.jabref.architecture.MainArchitectureTest` `doNotUseLogicInModel` <span style="color:red">FAILED</span>
* <span style="color:green">Fix</span> : One common case when this test fails is when you put any class purely containing business logic at some level inside the ```model``` directory (```org/jabref/model/```). To fix this, shift the class to a subdirectory within the ```logic``` directory (```org/jabref/logic/```).

* `org.jabref.logic.l10n.LocalizationConsistencyTest` `findMissingLocalizationKeys` <span style="color:red">FAILED</span>
* <span style="color:green">Fix</span> : You have probably used Strings that are visible on the UI (to the user) but not wrapped them using ```Localization.lang(...)``` and added them to the [localization properties file](https://github.com/JabRef/jabref/blob/main/src/main/resources/l10n/JabRef_en.properties).
Read more about the background and format of localization in JabRef [here](https://devdocs.jabref.org/code-howtos/localization.html).

<!-- markdownlint-disable-file MD033 -->
Loading