Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 29 additions & 0 deletions AGENTS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# Shell commands

- `make`, `make all`, or `make build`: Build the `openshift-router` executable.
- `make check`: Run unit tests for `openshift-router`.
- `make verify`: Verify that source code is properly formatted and that Go mod dependencies are correct.

Note that there is no make target for generated files. Also, this repository
does not have any integration or end-to-end tests; see the [openshift/origin](https://github.com/openshift/origin/tree/master/test/extended/router/)
or [openshift/cluster-ingress-operator](https://github.com/openshift/cluster-ingress-operator/tree/master/test/e2e/) repositories for those.

See also [the `HACKING.md` file](./HACKING.md) in this repository for some more advanced
commands for building and testing images.

# Code style

- Format code using gofmt.
- Add godoc for all package-level identifiers. Use your discretion, but when in doubt, add godoc.
- Write unit tests for new functionality. Use the standard Go testing package; we don't use Ginkgo or other testing frameworks in this repository.
- Add code comments as appropriate, using complete English sentences. Be kind to your fellow developers, including future you.
- In the absence of OpenShift-specific conventions, refer to the [Kubernetes Coding Conventions](https://www.kubernetes.dev/docs/guide/coding-convention/). Use your discretion; when in doubt, ask.

# Workflow

- Use commits to group changes logically. For example, sometimes it makes sense to do some refactoring in one commit, and then implement your defect fix or feature in a separate commit.
- Ensure each commit passes `make verify check`.
- Follow the [OpenShift](https://github.com/openshift/enhancements/blob/master/guidelines/commit_and_pr_text.md) and [Kubernetes commit message guidelines](https://www.kubernetes.dev/docs/guide/pull-requests/#commit-message-guidelines).
- If your code change requires `go mod` updates, commit the `go mod` updates (including `vendor/`) and document them in your commit message. Put your code changes and `go mod` updates in the same commit so that they can be reviewed and tested (using `make verify`) as a unit.
- Rebase in case of merge conflicts. Please don't have merge commits in your pull request.
- Please be sure to respond to PR review comments. If you accept a suggestion, say so. If you need clarification, ask. If you reject a suggestion, explain why; don't be shy, but do be respectful and forthright.
1 change: 1 addition & 0 deletions CLAUDE.md
2 changes: 1 addition & 1 deletion HACKING.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ $ make
To test Router changes on an available cluster, utilize `Dockerfile.debug` and
`Makefile.debug` in `hack/`.

`Dockerfile.debug` is a multi-stage dockerifle for building the Router binary,
`Dockerfile.debug` is a multi-stage Dockerfile for building the Router binary,
as well as the Router image itself. The outputted image uses `centos:8` as it's base
since installing packages on an OpenShift RHEL base image requires RHEL entitlements.

Expand Down