Skip to content

Commit

Permalink
Boilerplate docs
Browse files Browse the repository at this point in the history
  • Loading branch information
isc-tleavitt committed Jun 8, 2022
1 parent c9f3d6b commit f11a4b0
Show file tree
Hide file tree
Showing 4 changed files with 77 additions and 10 deletions.
22 changes: 22 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# How to contribute

Thank you for your interest in contributing! While this project originated at InterSystems, it is our hope that the community will continue to extend and enhance it.

## Submitting changes

If you have made a change that you would like to contribute back to the community, please send a [GitHub Pull Request](/pull/new/master) explaining it. If your change fixes an issue that you or another user reported, please mention it in the pull request. You can find out more about pull requests [here](http://help.github.com/pull-requests/).

## Coding conventions

Generally speaking, just try to match the conventions you see in the code you are reading. For this project, these include:

* Do not use shortened command and function names - e.g., `s` instead of `set`, `$p` instead of `$piece`
* One command per line
* Do not use dot syntax
* Indentation with tabs
* camelCase class names
* PascalCase method names
* Avoid using postconditionals
* Formal parameter names start with `p`
* Always check %Status return values
* Generally, throw and catch exceptions rather than using %Status
21 changes: 21 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2022 InterSystems Corporation

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
31 changes: 31 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# isc.codetidy
isc.codetidy provides server-side linting and advice to enforce and encourage reasonable ObjectScript coding standards.

## Getting Started
Note: a minimum platform version of InterSystems IRIS 2018.1 is required.

### Installation: ZPM

If you already have the [ObjectScript Package Manager](https://openexchange.intersystems.com/package/ObjectScript-Package-Manager-2), installation is as easy as:
```
zpm "install isc.codetidy"
```

## [Documentation](documentation.md)
See [Documentation](documentation.md)

## Contributing
Please read [contributing](https://github.com/intersystems/isc-codetidy/blob/master/CONTRIBUTING.md) for details on our code of conduct, and the process for submitting pull requests to us.

## Versioning
We use [SemVer](http://semver.org/) for versioning. Declare your dependencies using the InterSystems package manager for the appropriate level of risk.

## Authors
* **Sarmishta Velury** - [isc-svelury](http://github.com/isc-svelury)
* **Tim Leavitt** - [isc-tleavitt](http://github.com/isc-tleavitt)
* InterSystems TrakCare Development

See also the list of [contributors](https://github.com/intersystems/isc-codetidy/graphs/contributors) who participated in this project.

## License
This project is licensed under the MIT License - see the [LICENSE](https://github.com/intersystems/isc-codetidy/blob/master/LICENSE) file for details.
13 changes: 3 additions & 10 deletions documentation.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,13 @@ zpm "load <absolute path to repository root>"

## Setup

1. CodeTidy needs to configured to work alongside your source control to ensure consistency between the server and file-system. To do this run,
1. CodeTidy needs to configured to work alongside your source control to ensure consistency between the server and file-system. To do this, run:

```
do ##class(pkg.isc.codetidy.Utils).SetupExtension()
```

2. Configure Settings for CodeTidy. To run this do,
2. Configure Settings for CodeTidy. To do this, run:

```
do ##class(pkg.isc.codetidy.Utils).Configure()
Expand Down Expand Up @@ -51,14 +51,7 @@ This method will let you customize CodeTidy according to your requirements. The

3. **Fix indentation:** You can choose whether to fix the indentation for classes, routines, and JavaScript files.
4. **Pick indentation character:** You can choose to use tabs or spaces for indenting your code. If you want to use spaces, enter the number of spaces you'd like to indent with. Type "TAB" if you want to use tabs instead. This will convert the indentation the desired format across the file.
5. **Common issues/inefficiencies:** If you enable this option, CodeTidy will warn you if there are direct references to globals in your code. The globals **excluded** from the check are:

- `^ZPATCH`
- `^ZUPGRADE`
- `^ZBUILD`
- `^ZDATETR`
- `^ZSSC`

5. **Common issues/inefficiencies:** If you enable this option, CodeTidy will warn you if there are direct references to globals in your code.
6. **Consistent case:** When this is enabled, CodeTidy will change the case of all the commands, functions and variables to be the select character case. You can choose between making everything lower-case (this will affect all variables) and Pascal case(this will only affect system variables). It works for classes, routines and CSP files only.
7. **Macro comments:** You can pick this option if you don't want any of your comments to make their way into the compiled code, reducing the amount of storage needed for the program. If enabled, all comments will be converted to macro-comments.
8. **ESLint:** You can enable this if you want to use ESLint to lint your JavaScript files.
Expand Down

0 comments on commit f11a4b0

Please sign in to comment.