Cadstrom uses YAML to configure how we check your files for design rule problems because YAML is easily read by humans. It's also somewhat standard for configuring build systems.
If you want to learn more about YAML, check out these docs.
A full edrc configuration looks like this:
version: 1 eagle: drc: - file: 'my-design.brd' dru: 'oshpark-2layer' version: 8.4.1 - file: 'path/another-design.brd' dru: file: 'path/custom.dru' layers: '-ALL 5' version: 8.0.0 - file: 'path/third-design.brd' dru: file: 'path/custom.dru' layers: - ALL - -TOP - 5 version: 8.1.0
Let's break that down. This configuration will tell Cadstrom to check design rules on three files:
path-third-design.brd. From the configuration we can also tell that this project must have the following directory structure:
project/ my-design.brd path/ another-design.brd custom.dru third-design.brd
Next, let's look at what each of the options do:
version directive is for forward compatibility. It's optional.
- file: 'my-design.brd'
file directive specifies the path, from the root of the git repo, to the file that Cadstrom should process. It is required. Paths must use only forward slashes, and should NOT begin with a slash.
DRU directive specifies the set of design rules that should be used when processing the file. It has two forms: single line and advanced.
Single Line: The single line config is great when you want to use one of the built-in design rule sets. (You can see the list of built-in design rules here).
- dru: '<drufile>'
Advanced: The advanced form allows you to specify both the DRU file that should be used, as well as the layers that should be enabled while processing the rules. The
file sub-directive can specify the relative path to a DRU file within the repository or it can specify one of the built-in design rules.
- dru: file: '<drufile>' layers: '<layers>'
When specifing DRU layers you can either specify a flat list as a single string or using the below list syntax:
- dru: file: '<drufile>' layers: - 1 - 2 - 3
The above layers definition would be equivalent to the following:
- dru: file: '<drufile>' layers: '1 2 3'
version directive specifies the version of Eagle to use in checking design rules. The version must be specified with all three version numbers, and the default version is always the latest version. The available versions are: