Skip to content

Commit

Permalink
chore: fix markdown linting issues
Browse files Browse the repository at this point in the history
This fixes random markdown linting issues. The previous `sentences-per-line`
library seems to be broken now, and unmaintained. This moves to using
`textlint` instead.

Signed-off-by: Andrew Rynhard <[email protected]>
  • Loading branch information
andrewrynhard committed Apr 27, 2020
1 parent d91628a commit 37a7906
Show file tree
Hide file tree
Showing 8 changed files with 33 additions and 70 deletions.
3 changes: 2 additions & 1 deletion .dockerignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
!cmd
!docs
!hack
!_out/images/*.tar
!internal
!pkg
!vendor
Expand All @@ -13,3 +12,5 @@
!go.mod
!go.sum
!prototool.yaml
!README.md
!CONTRIBUTING.md
3 changes: 2 additions & 1 deletion .markdownlint.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{
"default": true,
"MD013": false
"MD013": false,
"MD033": false
}
17 changes: 7 additions & 10 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
First of all, thank you!
We value your time and interest in making Talos a successful open source project.

## What can I do to help?
## What We Need

There are a number of ways you can help!
We are in need of both technical and non-technical contributions.
Expand Down Expand Up @@ -31,14 +31,12 @@ EOF
chmod +x .git/hooks/commit-msg
```

In addition, all commits should be signed by the committer using `git commit -s` which should produce a commit
message with `Signed-off-by: Your Name <your@email>`. It is not necessary to cryptographically sign commits
with GPG.
In addition, all commits should be signed by the committer using `git commit -s`, which should produce a commit message with `Signed-off-by: Your Name <your@email>`.
It is not necessary to cryptographically sign commits with GPG.

### Pull Requests

To avoid multiples CI runs, please ensure that you are running a full build before submitting your PR, and
branches should be squashed to a single commit.
To avoid multiples CI runs, please ensure that you are running a full build before submitting your PR, and branches should be squashed to a single commit.

## Developing

Expand All @@ -51,7 +49,7 @@ GO111MODULE=on go get
make ci
```

# Make Targets
## Make Targets

In the `Makefile` there are a variety of targets, the most common are:

Expand All @@ -61,11 +59,10 @@ In the `Makefile` there are a variety of targets, the most common are:
- `talosctl-linux-amd64` and `talosctl-darwin-amd64` make the `talosctl` CLI tool for Linux & OSX respectively.
- `rootfs` creates an archive of the root filesystem preloaded with all the components needed to launch Talos & Kubernetes.

# Buildkit
## Buildkit

Talos uses Moby [buildkit](https://github.com/moby/buildkit) for concurrent and cache-efficient builds.
By default, a buildkit service is started locally, but if you want to offload the builds to another server,
you can start a buildkit service with the following command:
By default, a buildkit service is started locally, but if you want to offload the builds to another server, you can start a buildkit service with the following command:

```bash
docker run --detach --privileged --restart always --publish 1234:1234 moby/buildkit --addr tcp://0.0.0.0:1234
Expand Down
10 changes: 6 additions & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -493,12 +493,14 @@ RUN prototool lint --protoc-bin-path=/toolchain/bin/protoc --protoc-wkt-path=/to
# The markdownlint target performs linting on Markdown files.

FROM node:8.16.1-alpine AS lint-markdown
RUN npm install -g markdownlint-cli
RUN npm i sentences-per-line
RUN npm i -g markdownlint-cli
RUN npm i -g textlint
RUN npm i -g textlint-rule-one-sentence-per-line
WORKDIR /src
COPY .markdownlint.json .
COPY docs .
RUN markdownlint --rules /node_modules/sentences-per-line/index.js .
COPY . .
RUN markdownlint --ignore "**/node_modules/**" --ignore '**/hack/chglog/**' .
RUN find . -name '*.md' -not -path '*/node_modules/*' -not -path '*/docs/talosctl/*' | xargs textlint --rule one-sentence-per-line --stdin-filename

# The docs target generates documentation.

Expand Down
15 changes: 11 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
<!-- markdownlint-disable MD041 MD034 -->

<p align="center">
<h1 align="center">Talos</h1>
<p align="center">A modern OS for Kubernetes.</p>
Expand All @@ -13,7 +15,9 @@

---

**Talos** is a modern OS designed to be secure, immutable, and minimal. All system management is done via an API, and there is no shell or interactive console. Some of the capabilities and benefits provided by Talos include:
**Talos** is a modern OS designed to be secure, immutable, and minimal.
All system management is done via an API, and there is no shell or interactive console.
Some of the capabilities and benefits provided by Talos include:

- **Security**: Talos reduces your attack surface by practicing the Principle of Least Privilege (PoLP) and by securing the API with mutual TLS (mTLS) authentication.
- **Predictability**: Talos eliminates unneeded variables and reduces unknown factors in your environment by employing immutable infrastructure ideology.
Expand All @@ -40,7 +44,8 @@ We hold two weekly meetings targeted for different audiences.

### Maintainers and Contributors

When attending this meeting, please add yourself to the [meeting notes](https://docs.google.com/document/d/1xBhfYg2TK8gtXtaMe3ojXeDS1qRN6MJ-Wo7IjNJSCwQ/edit#) as an attendee. If you would like to discuss a specific topic, we encourage you to add it to the agenda.
When attending this meeting, please add yourself to the [meeting notes](https://docs.google.com/document/d/1xBhfYg2TK8gtXtaMe3ojXeDS1qRN6MJ-Wo7IjNJSCwQ/edit#) as an attendee.
If you would like to discuss a specific topic, we encourage you to add it to the agenda.

- When: Thursdays at 17:00 UTC.
- Where: [zoom](https://zoom.us/j/3595189922).
Expand All @@ -51,8 +56,10 @@ You can subscribe to these meetings by joining the community forum above.
## Contributing

Contributions are welcomed and appreciated! See [Contributing](CONTRIBUTING.md) for our guidelines.
Contributions are welcomed and appreciated!
See [Contributing](CONTRIBUTING.md) for our guidelines.

## License

[![license](https://img.shields.io/github/license/talos-systems/talos.svg?style=flat-square)](https://github.com/talos-systems/talos/blob/master/LICENSE)
[!
[license](https://img.shields.io/github/license/talos-systems/talos.svg?style=flat-square)](https://github.com/talos-systems/talos/blob/master/LICENSE)
15 changes: 5 additions & 10 deletions docs/community/project-layout.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
# Project Layout Standards

In this document we will cover our official layout standards.
You will find that the project is a monolithic repository that contains
everything required to build and run Talos.
You will find that the project is a monolithic repository that contains everything required to build and run Talos.

```bash
$ tree .
Expand All @@ -27,17 +26,15 @@ $ tree .

## Internal Applications

Talos is comprised of applications designed to handle the various domains of
an operating system.
Talos is comprised of applications designed to handle the various domains of an operating system.
The following requirements must be adhered to by an `app`:

- anything ran as a service, that is maintained by us, should live under `internal/app`
- each `app` is allowed at most 1 level of an `internal` package

## Internal Packages

There are a number of packages we will need to maintain that are strongly
coupled with Talos business logic.
There are a number of packages we will need to maintain that are strongly coupled with Talos business logic.
These package should be housed within the `internal/pkg` directory.
The criteria for deciding if a package should be housed here are as follows:

Expand All @@ -46,16 +43,14 @@ The criteria for deciding if a package should be housed here are as follows:

## Public Packages

In building higher level abstractions, we should strive to create generic,
general use packages that can be used independent of Talos.
In building higher level abstractions, we should strive to create generic, general use packages that can be used independent of Talos.
The following rules apply to public packages:

- a `pkg` should _never_ contain `internal` code

### Graduation Criteria

In deciding if a package should be moved to an external repository, the
following should be taken into consideration:
In deciding if a package should be moved to an external repository, the following should be taken into consideration:

- are there requests for exposing the package?
- are there people willing to maintain the package?
14 changes: 0 additions & 14 deletions internal/app/networkd/README.md

This file was deleted.

26 changes: 0 additions & 26 deletions internal/pkg/provision/providers/firecracker/README.md

This file was deleted.

0 comments on commit 37a7906

Please sign in to comment.