|
| 1 | +Repository Standards |
| 2 | +==================== |
| 3 | + |
| 4 | +This document outlines the standards and best practices for LizardByte repositories to ensure consistency, |
| 5 | +maintainability, and quality across all projects. |
| 6 | + |
| 7 | +Repository Structure |
| 8 | +-------------------- |
| 9 | + |
| 10 | +File Organization |
| 11 | +~~~~~~~~~~~~~~~~~ |
| 12 | + |
| 13 | +All repositories should follow a consistent structure: |
| 14 | + |
| 15 | +.. code-block:: text |
| 16 | +
|
| 17 | + repository-name/ |
| 18 | + ├── .github/ |
| 19 | + │ ├── matchers/ # custom problem matchers |
| 20 | + │ ├── workflows/ |
| 21 | + │ │ ├── _codeql.yml |
| 22 | + │ │ └── _common-lint.yml |
| 23 | + │ ├── dependabot.yml |
| 24 | + │ └── semantic.yml |
| 25 | + ├── branding/ # project specific branding assets |
| 26 | + ├── docs/ # structure varies depending on the doc system used |
| 27 | + ├── src/ # main source code |
| 28 | + ├── tests/ # if there are tests |
| 29 | + ├── third-party/ # location of submodules if any |
| 30 | + ├── .gitignore |
| 31 | + ├── LICENSE |
| 32 | + └── README.md or README.rst |
| 33 | +
|
| 34 | +Required Files |
| 35 | +~~~~~~~~~~~~~~ |
| 36 | + |
| 37 | +Every repository must include: |
| 38 | + |
| 39 | +- **LICENSE**: All projects must use an appropriate license |
| 40 | +- **README**: Primary documentation in reStructuredText (.rst) or Markdown (.md) format |
| 41 | +- **.gitignore**: Appropriate for the project's language and framework. |
| 42 | + See `GitHub's collection <https://github.com/github/gitignore>`_ for starter templates. |
| 43 | +- **.github/**: Contains GitHub-specific configurations (workflows, issue templates, etc.) |
| 44 | + |
| 45 | +Naming Conventions |
| 46 | +------------------ |
| 47 | + |
| 48 | +Repository Names |
| 49 | +~~~~~~~~~~~~~~~~ |
| 50 | + |
| 51 | +- Be descriptive and concise |
| 52 | +- Avoid abbreviations unless widely understood |
| 53 | + |
| 54 | +Branch Names |
| 55 | +~~~~~~~~~~~~ |
| 56 | + |
| 57 | +- Use descriptive names with forward slashes for organization |
| 58 | +- Format: ``type/short-description`` |
| 59 | +- Types: ``feat/``, ``fix/``, ``docs/``, ``refactor/``: |
| 60 | + see `Convential Commits <https://www.conventionalcommits.org/en/v1.0.0/>`_ |
| 61 | +- Examples: ``feat/user-authentication``, ``fix/memory-leak``, ``docs/api-reference`` |
| 62 | + |
| 63 | +File and Directory Names |
| 64 | +~~~~~~~~~~~~~~~~~~~~~~~~~ |
| 65 | + |
| 66 | +- Be consistent within each project |
| 67 | +- Avoid spaces and special characters |
| 68 | + |
| 69 | +For questions about these standards or exceptions, please open an issue in the ``.github`` repository |
| 70 | +or contact the maintainers. |
0 commit comments