Skip to content
Merged
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
23 changes: 23 additions & 0 deletions .github/workflows/golangci-lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: golangci-lint
on:
push:
branches:
- main
pull_request:

permissions:
contents: read

jobs:
golangci:
name: lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
- uses: actions/setup-go@v6
with:
go-version: stable
- name: golangci-lint
uses: golangci/golangci-lint-action@v9
with:
version: v2.6
19 changes: 19 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: Go
on: [push]

jobs:
build:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v5
- name: Setup Go
uses: actions/setup-go@v5
with:
go-version: '1.25.0'
- name: Install dependencies
run: go get .
- name: Build
run: go build -v ./...
- name: Test with the Go CLI
run: go test
32 changes: 32 additions & 0 deletions .golangci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
version: "2"

linters:
enable:
- bodyclose
- errcheck
- goconst
- gocritic
- govet
- ineffassign
- mirror
- misspell
- nolintlint
- paralleltest
- revive
- staticcheck
- unconvert
- unparam
- unused
- whitespace

formatters:
enable:
- gci
- gofmt
- goimports
settings:
gci:
sections:
- standard
- default
- localmodule
23 changes: 22 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,23 @@
# codemd
Parse source code files and generate a markdown file

Convert between markdown files containing code blocks and individual source files.

## Installation

```bash
go install github.com/lynxai-team/codemd@latest
```

## Usage

### Convert source files to markdown

```bash
codemd tomd -f main.go -f helper.js -o docs.md
```

Or scan a directory:

```bash
codemd tomd -d ./src -o docs.md
```
Loading