Skip to content

Commit e499210

Browse files
authored
Create CONTRIBUTING.md
1 parent f19729e commit e499210

File tree

1 file changed

+73
-0
lines changed

1 file changed

+73
-0
lines changed

CONTRIBUTING.md

Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
# Contributing to Express SQL
2+
3+
:wave: Hi there! Thanks for using and contributing to the Express SQL suite of scripts!
4+
5+
Below are guidelines and helpful approaches for participating in the project.
6+
7+
* [How to Help](#how-to-help)
8+
* [Testing](#testing)
9+
* [Style Guide](#style-guide)
10+
11+
## How to Help
12+
13+
You can help contribute by:
14+
15+
* Opening a feature request
16+
* Opening a :bug:
17+
* Increasing unit test coverage
18+
* Making a pull request to address any of the above
19+
## Testing Locally
20+
21+
While Appveyor tests across most modern SQL Server versions for compatibility
22+
and unit tests check basic functionality, there are still parts of the scripts
23+
that benefit from human validation and localized testing scenarios.
24+
25+
If you have multiple versions of SQL Server at your disposal, testing across
26+
them is appreciated.
27+
28+
To run local tests from the root of the repository, use the same
29+
PowerShell scripts used by Appveyor (check appveyor.yml for
30+
examples of how to use each script):
31+
32+
1. If you don't have the PowerShell modules DbaTools and SqlServer (and don't
33+
want to install them manually) you can run `appveyor\install_dependencies.ps1`
34+
to get them in addition to TSQLLint (via npm)
35+
2. If you don't have a [tSQLt][tsqlt] database already, run `appveyor\install_tsqlt.ps1`
36+
to install a local copy of it
37+
3. Install the Express SQL Suite with `appveyor\install_expsql.ps1`
38+
4. Build the unit tests with `appveyor\build_tsqlt_tests.ps1`
39+
5. Make any proposed modifications to the scripts
40+
6. Verify all unit tests pass with `appveyor\run_tsqlt_tests.ps1`
41+
7. If `sp_doc` was changed, visually inspect a generated markdown file
42+
to ensure everything looks as expected (but do not commit it to your branch)
43+
8. Make a pull request! :tada:
44+
45+
## Style Guide
46+
47+
Styles (or lack thereof) that are particular to this project. Think :tshirt:, not :necktie:
48+
49+
### T-SQL
50+
51+
While there is no hard rule on T-SQL style enforced or linted in this project, use
52+
your discretion to fit the existing style and favor readability over a strict
53+
adherence to a specific style.
54+
55+
### Markdown
56+
57+
All markdown, whether manually or automatically generated, should adhere to standard
58+
markdown rules. This project utilize's David Anson's [markdown lint][mdlint]
59+
with a slightly customized
60+
[configuration][mdconfig].
61+
62+
You can use our config and markdown lint plugins in your IDE of choice, or just wait
63+
for your commits to be automatically linted using Github Actions.
64+
65+
### PowerShell
66+
67+
PowerShell is only used in the automation piece of this project, but could probably
68+
benefit from being better documented and standardized. Right now no particular
69+
style is enforced, but one may be used in the future.
70+
71+
[mdconfig]: https://github.com/LowlyDBA/ExpressSQL/blob/master/.github/linters/.markdown-lint.yml
72+
[mdlint]: https://github.com/DavidAnson/markdownlint
73+
[tsqlt]: https://tsqlt.org/

0 commit comments

Comments
 (0)