Commit Graph

16 Commits

Author SHA1 Message Date
Omar Sandoval
e6fb8f14d4 CONTRIBUTING: fix nested list syntax
Extra new lines are required around the nested list.

Signed-off-by: Omar Sandoval <osandov@osandov.com>
2024-01-04 14:39:58 -08:00
Stephen Brennan
475e694e12 CONTRIBUTING: drop support for developing on EOL Python versions
Since updating pre-commit and the hooks, development on EOL Python
versions is no longer supported, and will fail. Update the contributing
guide to explain that Python 3.6 is supported for build, runtime, and
tests, but development workflow scripts require a supported Python
version. Repeat this warning in the pre-commit section, where it is most
relevant.

Signed-off-by: Stephen Brennan <stephen.s.brennan@oracle.com>
2023-11-29 08:56:12 -08:00
Omar Sandoval
3fb557e818 CONTRIBUTING: fix typo in bad C example and make style worse
Signed-off-by: Omar Sandoval <osandov@osandov.com>
2023-11-06 15:20:53 -08:00
Omar Sandoval
5813d6640b CONTRIBUTING: reorganize Python guidelines and expand C coding style guidelines
Signed-off-by: Omar Sandoval <osandov@osandov.com>
2023-11-06 15:12:44 -08:00
Omar Sandoval
f27485670a CONTRIBUTING: add Linux kernel helper guidelines
Signed-off-by: Omar Sandoval <osandov@osandov.com>
2023-07-19 14:48:22 -07:00
Omar Sandoval
1c0dbcd917 pre-commit: add flake8
This has been useful to run manually before, but I haven't added it to
the CI because it was somewhat noisy. But, it reports some really useful
warnings, so let's configure it for our needs and add it to pre-commit.

Signed-off-by: Omar Sandoval <osandov@osandov.com>
2022-05-17 15:26:41 -07:00
Omar Sandoval
24609a3a2e libdrgn: add autoconf option to enable compiler warnings
This adds an --enable-compiler-warnings flag that:

* Defines a canonical list of warnings that we enforce. For now, this is
  -Wall -Wformat-overflow=2 -Wformat-truncation=2, but we can add to it
  going forward.
* Enables warnings by default.
* Allows erroring on warnings. We recommend that developers use this and
  use it for the CI.

Signed-off-by: Omar Sandoval <osandov@osandov.com>
2022-03-01 15:38:05 -08:00
Omar Sandoval
b15706ebc4 CONTRIBUTING: elaborate on pre-commit
Get rid of the directions for running isort and black directly, since
that might run a different version than we have configured for
pre-commit. Instead, elaborate on pre-commit, including how to run
pre-commit manually.

Signed-off-by: Omar Sandoval <osandov@osandov.com>
2022-02-22 15:14:34 -08:00
Stephen Brennan
ae377984d4 Add pre-commit
During PRs, lint and mypy errors can show up in the CI tests, which is
useful, but can introduce unnecessary churn on the PR as small lint
fixes are pushed. This commit adds (optional) support for pre-commit, a
tool which can be configured to run as a git pre-commit hook, running
linters on all changed code to catch issues before you push your code.

Signed-off-by: Stephen Brennan <stephen.s.brennan@oracle.com>
2022-01-14 13:31:16 -08:00
Omar Sandoval
2ce41c22ae CONTRIBUTING: mention that _destroy functions should allow NULL
This is another undocumented convention.

Signed-off-by: Omar Sandoval <osandov@osandov.com>
2022-01-06 18:21:46 -08:00
Omar Sandoval
609b4cc352 CONTRIBUTING: document some libdrgn coding conventions
Document conventions for init/deinit functions, create/destroy
functions, and functions which modify a struct drgn_object.

Signed-off-by: Omar Sandoval <osandov@osandov.com>
2021-12-13 11:40:15 -08:00
Omar Sandoval
1b7badad0a docs: expand and reorganize installation instructions
* Mention installing drgn using a package manager on Fedora/EPEL.
  Closes #103.
* Mention that pip installs a binary wheel by default.
* Include instructions for installing from source in README.

Signed-off-by: Omar Sandoval <osandov@osandov.com>
2021-11-03 16:18:22 -07:00
Omar Sandoval
277c34e876 CONTRIBUTING: add guidelines for good commits
Signed-off-by: Omar Sandoval <osandov@osandov.com>
2021-01-12 16:56:54 -08:00
Omar Sandoval
4e770fb18a Format imports with isort
Signed-off-by: Omar Sandoval <osandov@osandov.com>
2020-08-20 16:55:07 -07:00
Omar Sandoval
0cf3320a89 Add type annotations to helpers
Now that drgndoc can handle overloads and we have the IntegerLike and
Path aliases, we can add type annotations to all helpers. There are also
a couple of functional changes that snuck in here to make annotating
easier.

Signed-off-by: Omar Sandoval <osandov@osandov.com>
2020-08-20 16:28:02 -07:00
Omar Sandoval
4de147e478 Add CONTRIBUTING.rst
This documents best practices for contributing to drgn. We now require a
DCO sign-off.

Also clean up some related areas in the documentation.

Signed-off-by: Omar Sandoval <osandov@osandov.com>
2020-07-07 17:44:02 -07:00