Code Monkey home page Code Monkey logo

adr-log's People

Contributors

fetz avatar gsobczyk avatar hueneburg avatar jlawrienyt avatar jonschlinkert avatar koppor avatar lharzenetter avatar mcwarman avatar mee4895 avatar nlarzon avatar sergii-deity avatar tstadelmaier avatar wyrfel avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

adr-log's Issues

Rename to adr-toc

The name "adr-log" confused people, to this tool should be renamed to "adr-toc"

Fix handling of missing -d parameter

Doc:

(Without this flag, the current working directory will be chosen as default)

But when runnign inside docs/adr, ../../index.md is generated. I tried it inside the madr repository.

Fail if the target document will be changed

For the purpose of continuous integration (CI), I'd like a script that will fail (as in exit non-zero) when someone adds a new ADR record but forgets to update the table of contents.

It could look something like:

adr-log -d ./docs/adrs/ -i --disallow-changes

If that command would otherwise require updating / creating a file, it would fail. Such a failure probably indicates that the commit author forgot to re-generate the table of contents.

The current work around is something like this in a CI script:

adr-log -d ./docs/adrs/ -i 
# Check to see if any files were modified and exit non-zero:
git status ...

The workaround is not too bad but it requires relying on something like git within CI and some bash magic.

As a point of reference prettier --check exists for a similar use case.

template.md is included in the ToC

When running adr-log -i, the template is considered to be an ADR, and therefore included in the ToC of index.md.

This is not desierable, and template.md should be excluded.

I believe this is a result of "fallback to auto-numbering for ADRs without filename prefixes or frontmatter".

I'd considser this also not desierable.

Cloning this repo and running adr-log -h . in the docs/adr folder includes template.md.

Enable more comments inside <!-- adr-log -->

I would like to enable

<!-- adr-log -- Regenerate the content by using "adr-log -i". You can install it via "npm install -g adr-log" -->

For me, it would also be OK, to support that string only in addition to <!-- adr-log -->.

index generation via adr-log -i produces incorrect path to ADR files

Hi,

The last change seems to have introduced an error in the generation, such that the links to the ADRs are broken.
suggested fix: Either insert an extra slash or remove redundant ../[adr-dir]

  • environment: Windows 10, using WinGit console
  • ADR location within project structure:
/docs/[adr-dir]/  
    | 0000-first.md  
    | index.md   

from within [adr-dir], run
adr-log -i

Expected output:

<!-- adrlog -->

- [ADR-0000](0000-first.md) - First

<!-- adrlogstop -->

Actual output:


<!-- adrlog -->

- [ADR-0000](../[adr-dir]0000-first.md) - First

<!-- adrlogstop -->

adr-log -d ./ does produce correct output

New line is added while adr TOC is injected in another file

While generating TOC and injecting it to the target file with command adr-log -d "adr" -i "index.md" additional new line is added every time after <!-- adrlogstop --><!-- adrlogstop -->. In the end even if there is no changes in ADR TOC, still the target file is reported as changed by git because of this additional empty line(s).

link of ADR log/toc generated will be wrong if input path and directory of the logs are different

TOC links generated by Adr-log should take in consideration the path of the input and the directory of the adr-logs

Scenario

  • with a following tree
.
├── docs
│   ├── README.md
│   ├── adr
│   │   ├── 0001-adr.md
│   │   ├── 0002-adr.md
│   │   ├── 0003-adr.md
  • with the <!-- adrlog --><!-- adrlogstop --> on the docs/README.md
  • if I execute this command
adr-log docs/README.md -d docs/adr/ -i

Expected Result:

- [ADR-0001](adr/0001-adr.md) - adr
- [ADR-0002](adr/0002-adr.md) - adr
- [ADR-0003](adr/0003-adr.md) - adr

Actual result:

- [ADR-0001](0001-adr.md) - adr
- [ADR-0002](0002-adr.md) - adr
- [ADR-0003](0003-adr.md) - adr

Use "LOG" instead of "TOC" in the help

A set of architectural decision records is a architectural decision log. See first paragraph at https://adr.github.io/.

Therefore, all TOCs in the cli.js should be replaced with LOG:

E.g.,

The markdown file to contain the table of contents,
If no <file> file is specified, a index.md file containing the TOC is created in the given directory.

should change to

The markdown file to contain the decision log,
If no <file> file is specified, a index.md file containing the LOG is created in the given directory.

First line is the heading

Take following MADR:

# Use Eclipse Orion as Editor
Editor should provide syntax highlighting and work in browser.

Then, Use Eclipse Orion as Editor should be the title, not Use Eclipse Orion as EditorEditor should provide syntax highlighting and work in browser.

Refs #5

Keep line endings of file

Windows line endings are changed to Unix line endings in parts of the file. Either ALL line endings should be changed or the new line endings should be Windows, too (preferred).

grafik

Rework parameters and add ADR

How to design command line?

Options:

  1. File always has to be given and file name at end: [-d <directory>] [-i] [<input>]. Current directory is used if no -d is given. If <input> is missing: help is printed
  2. Directory always has to be given and directory name at end: [-f <file>] [-i] <directory>. If -f is not provided: Output to stdout without reading any index file

Chosen option: File always has to be given and filename at end. Reason: Consistency to markdown-toc. See https://github.com/jonschlinkert/markdown-toc#cli.

Please rewrite current CLI to this and update documentation accordingly.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.