Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Generate C API documentation using libclang Python bindings.
For an example see the documentation.
Ideally, code should be self-documenting. To me that means little to no documentation should be needed in the code itself, as it strongly tends to harm readability if the code already explains itself. The remaining use-cases for documentation are typically
This project focuses on generating API references, as the other use-cases tend to be written separate from the code.
The markdown-files generated by clang-api-doc
can be used in any way you wish to create your final
documentation, for example
mkdocs
sphinx
pandoc
The clang-api-doc
package is on PyPI, so you can use pip
, poetry
, or whatever you like to install it,
for example pip install clang-api-doc
.
To install it locally and in editable mode, simply install poetry and run poetry install
and to load the
virtual environment run poetry shell
.
Simply call clang-api-doc
once per file you wish to document, e.g.
clang-api-doc -i 'include/mylib/first.h' -o 'docs/first.md'
clang-api-doc -i 'include/mylib/second.h' -o 'docs/second.md'
or once per folder, e.g.
clang-api-doc -i 'include/mylib/' -o 'docs/'
from clang_api_doc import clang_api_doc
for file_in, file_out in zip(input_files, output_files):
clang_api_doc.transform_file(file_in, file_out)
FAQs
Automatically generate API documentation for C language dialects
We found that clang-api-doc demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.