If you see unexpected behavior with this project, please create an issue on GitHub with the following information:
- A title and a clear description of the issue.
- The project version (for example "0.1.4").
- The framework version (for example "Node.js 8.11.3").
- The browser version (for example "Chrome 67.0.3396.99").
If possible, include the following to help us reproduce the issue:
- A code sample that demonstrates the issue.
- Any unit test cases that show how the expected behavior is not occurring.
- An executable test case.
If you have a question about Splunk, see Splunk Answers.
We recommend the following tools for formatting and styling JavaScript code:
-
ESLint, a linting utility
For configuration details, see Configuring ESLint on the ESLint website.
-
Prettier, a code formatter
For configuration details, see Configuration File on the Prettier website.
-
JSDoc, a tool for generating API documentation
This section describes recommended tools for the Mac OS X development environment.
We recommend the Homebrew package manager for *nix development environments.
Run the following command to install Homebrew:
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
Next, run the following command to update Homebrew:
brew update
Use Homebrew to install additional tools:
Install Docker, a container platform. For installation details, see Install Docker Desktop for Mac on the Docker Docs website.
To install JavaScript dependencies, run the following command from the root of the project repository:
yarn
Follow the Conventional Commits format for Git commit messages. Using the format makes the commit history for the project more readable and generates a changelog automatically.
To enforce formatting of commit messages, use the Commitizen CLI wizard:
-
After staging your changes, run the following command:
yarn run commit
-
Follow the prompts to finish formatting your commit messages.
Use the following format for commit messages:
<type>(<scope>): <subject>
<blank_line>
<body>
<blank_line>
<footer>
Use one of the following values for "type":
type | Description |
---|---|
feat | A new feature |
fix | A bug fix |
docs | Documentation-only changes |
style | Changes that do not affect the meaning of the code |
refactor | A code change that neither fixes a bug nor adds a feature |
release | An aggregation of code changes to be used for a release |
perf | A code change that improves performance |
test | A code change that adds, updates, or fixes tests |
ci | A code change in the CI pipeline |
revert | Revert to a commit |
Scopes are broken down at a service level. The value for "scope" must be one of the following:
- action
- auth
- catalog
- core
- examples
- identity
- ingest
- kvstore
- search
- streams
Note: If your changes do not apply to any of the scopes above, or if your changes affect more than one scope, use a scope value of "*".
For the subject of the commit message, use a short description of the change:
- Start the description with present tense (for example, "add", not "added" nor "adds").
- Don't capitalize the first letter.
- Don't include references to JIRA tickets or GitHub issue numbers.
For the body of the commit, follow the rules above and include detailed descriptions of the code changes.
-
Fill out the Splunk Contribution Agreement.
-
Configure your development environment as described above.
-
Create a new branch. For example:
git checkout -b my-branch develop
-
Make code changes in your branch with tests, using the code formatting and styling tools listed above.
-
Check for lint errors.
yarn run tslint
-
Commit your changes. Be sure to adhere to the Conventional Commits format.
yarn commit
-
Push your branch to GitHub.
git push origin my-branch
-
In GitHub, create a pull request that targets the develop branch. CI tests are run automatically.
-
After the pull request is merged, delete your branch.
-
Pull changes from the develop branch.
git checkout develop git pull develop
To generate documentation, enter the following command:
yarn ts:docs
If you have questions, reach out to us on Slack in the #sdc channel or email us at [email protected].