The Acrolinx for Git Hosting integration reads its configuration files and remote repository registry from JSON files. Configuration files include the following:
-
User-specific local configuration file
-
Global configuration file
-
Repository-level configuration file and registry
You can specify all three types of configuration files in both EDN and JSON, with JSON being the format that takes precedence.
If the integration detects a JSON file, it reads the remote configuration from that file and ignores the EDN configuration file. If there’s no JSON file present in the repository, the remote EDN configuration is read only.
Tip
The above reading rules and format precedence apply to the repository registry file as well. We've provided support for the reading and writing of the repo state from and to the JSON repository registry file.
The JSON format doesn’t support comments. However, Acrolinx supports comments as objects and key-value pairs where the comment object name or key name starts with two forward slashes (//).
For example:
{ "//comment001": "A comment", ":foo0": [{"//comment0001": "A comment inside an array"}, "foo"], ":foo1": { "//comment001": "Yet another comment", ":foo2": "foo2" } }
When the files are read, the comments are ignored. For future compatibility, we recommend unique comment keys.
Naming convention for the configuration options
The naming convention for the configuration options is the same as it is for EDN. When you specify the configuration options in your JSON files, make sure they start with a colon (:
).
Naming convention for the configuration files
You need to make sure that the user-specific local configuration file ends in a .json
extension. The file names are as follows:
-
Global configuration file name:
global-config.json
-
Repository-level configuration file name:
acrolinx-config.json
-
Repository registry file name:
repositories.json
.