Skip to content

Commit

Permalink
UPDATE: name should be all lowercase
Browse files Browse the repository at this point in the history
  • Loading branch information
fileformat committed Dec 10, 2023
1 parent bf132c7 commit 8cf84c9
Show file tree
Hide file tree
Showing 32 changed files with 55 additions and 39 deletions.
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/bug.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,6 @@ Expected output:

Actual output:

OS and FFLint versions:
OS and fflint versions:

Please attach sample files needed to replicate
2 changes: 1 addition & 1 deletion .github/workflows/dogfooding.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ jobs:

- name: Generate reports
run: |
echo "# Dogfooding FFLint" >$GITHUB_STEP_SUMMARY
echo "# Dogfooding fflint" >$GITHUB_STEP_SUMMARY
echo "## Extensions in use" >>$GITHUB_STEP_SUMMARY
./fflint ext --output=markdown "./**" >>$GITHUB_STEP_SUMMARY
echo "" >>$GITHUB_STEP_SUMMARY
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
# FFLint [<img alt="FFLint logo" src="docs/favicon.svg" height="90" align="right" />](https://www.fflint.org/)
# fflint [<img alt="fflint logo" src="docs/favicon.svg" height="90" align="right" />](https://www.fflint.org/)

[![build](https://github.com/FileFormatInfo/fflint/actions/workflows/build.yaml/badge.svg)](https://github.com/FileFormatInfo/fflint/actions/workflows/build.yaml)
[![release](https://github.com/FileFormatInfo/fflintactions/workflows/release.yaml/badge.svg)](https://github.com/FileFormatInfo/fflint/actions/workflows/release.yaml)
[![dogfooding](https://github.com/FileFormatInfo/fflint/actions/workflows/dogfooding.yaml/badge.svg)](https://github.com/FileFormatInfo/fflint/actions/workflows/dogfooding.yaml)

FFLint is a linter for file formats. Are your files:
fflint is a linter for file formats. Are your files:
* in the correct format?
* with the correct extension?
* with the correct image dimensions?
Expand Down
2 changes: 1 addition & 1 deletion cmd/docgen/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ func main() {
w := bufio.NewWriter(f)
w.WriteString("---\n")
w.WriteString(fmt.Sprintf("h1: The %s Command\n", cmdName))
w.WriteString(fmt.Sprintf("title: '%s: %s - FFLint'\n", cmdName, c.Short))
w.WriteString(fmt.Sprintf("title: '%s: %s - fflint'\n", cmdName, c.Short))
w.WriteString(buf.String())
w.WriteString("---\n")
w.WriteString(noteLine)
Expand Down
2 changes: 1 addition & 1 deletion cmd/fflint/main_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ func TestMain(m *testing.M) {
os.Exit(exitVal)
}

func TestFFLint(t *testing.T) {
func Testfflint(t *testing.T) {
testscript.Run(t, testscript.Params{
Dir: "../../testdata",
})
Expand Down
Binary file modified cmd/online/assets/favicon.ico
Binary file not shown.
15 changes: 14 additions & 1 deletion cmd/online/assets/favicon.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 3 additions & 3 deletions cmd/online/assets/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,16 @@
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="css/pico.min.css">
<title>Online File Format Linting - FFLint</title>
<title>Online File Format Linting - fflint</title>
</head>
<body>
<main class="container">
<h1>
<img src="favicon.svg" style="width:28pt;height:28pt;margin-top:-4pt;margin-right:4pt;" />
FFLint API
fflint API
</h1>

<p>A simple online service for <a href="https://www.fflint.org/">FFLint</a>, the file format linter.</p>
<p>A simple online service for <a href="https://www.fflint.org/">fflint</a>, the file format linter.</p>

<p style="text-align:center"><small>A service of <a href="https://www.fileformat.info/">FileFormat.info</a></small></p>
</main>
Expand Down
2 changes: 1 addition & 1 deletion docs/_commands/ext.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
h1: The ext Command
title: 'ext: Validate (or report) file extensions - FFLint'
title: 'ext: Validate (or report) file extensions - fflint'
name: fflint ext
synopsis: Validate (or report) file extensions
description: Check and report on the file extensions in use
Expand Down
2 changes: 1 addition & 1 deletion docs/_commands/frontmatter.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
h1: The frontmatter Command
title: 'frontmatter: Validate frontmatter - FFLint'
title: 'frontmatter: Validate frontmatter - fflint'
name: fflint frontmatter
synopsis: Validate frontmatter
description: Checks that the frontmatter in your files is valid
Expand Down
2 changes: 1 addition & 1 deletion docs/_commands/html.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
h1: The html Command
title: 'html: Validate HTML files - FFLint'
title: 'html: Validate HTML files - fflint'
name: fflint html
synopsis: Validate HTML files
description: Check HTML files for errors
Expand Down
2 changes: 1 addition & 1 deletion docs/_commands/ico.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
h1: The ico Command
title: 'ico: Validate icons - FFLint'
title: 'ico: Validate icons - fflint'
name: fflint ico
synopsis: Validate icons
description: Check that your icons (.ico files) are valid
Expand Down
2 changes: 1 addition & 1 deletion docs/_commands/jpeg.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
h1: The jpeg Command
title: 'jpeg: Validate JPEG images - FFLint'
title: 'jpeg: Validate JPEG images - fflint'
name: fflint jpeg
synopsis: Validate JPEG images
description: Check that your JPEG files are valid
Expand Down
2 changes: 1 addition & 1 deletion docs/_commands/json.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
h1: The json Command
title: 'json: Validate JSON files - FFLint'
title: 'json: Validate JSON files - fflint'
name: fflint json
synopsis: Validate JSON files
description: Check that your JSON files are valid
Expand Down
2 changes: 1 addition & 1 deletion docs/_commands/mimetype.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
h1: The mimetype Command
title: 'mimetype: Validate (or report) MIME content types - FFLint'
title: 'mimetype: Validate (or report) MIME content types - fflint'
name: fflint mimetype
synopsis: Validate (or report) MIME content types
description: Check and report on the MIME content types in use
Expand Down
2 changes: 1 addition & 1 deletion docs/_commands/png.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
h1: The png Command
title: 'png: Validate png images - FFLint'
title: 'png: Validate png images - fflint'
name: fflint png
synopsis: Validate png images
description: Check that your PNG files are valid
Expand Down
2 changes: 1 addition & 1 deletion docs/_commands/svg.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
h1: The svg Command
title: 'svg: Validate SVG images - FFLint'
title: 'svg: Validate SVG images - fflint'
name: fflint svg
synopsis: Validate SVG images
description: |
Expand Down
2 changes: 1 addition & 1 deletion docs/_commands/text.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
h1: The text Command
title: 'text: Validate plain text files - FFLint'
title: 'text: Validate plain text files - fflint'
name: fflint text
synopsis: Validate plain text files
description: |
Expand Down
2 changes: 1 addition & 1 deletion docs/_commands/version.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
h1: The version Command
title: 'version: Prints fflint version information - FFLint'
title: 'version: Prints fflint version information - fflint'
name: fflint version
synopsis: Prints fflint version information
usage: fflint version [flags]
Expand Down
2 changes: 1 addition & 1 deletion docs/_commands/xml.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
h1: The xml Command
title: 'xml: Validate XML files - FFLint'
title: 'xml: Validate XML files - fflint'
name: fflint xml
synopsis: Validate XML files
description: Checks that your XML files are valid
Expand Down
2 changes: 1 addition & 1 deletion docs/_commands/yaml.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
h1: The yaml Command
title: 'yaml: Validate YAML files - FFLint'
title: 'yaml: Validate YAML files - fflint'
name: fflint yaml
synopsis: Validate YAML files
description: Check that your YAML files are valid
Expand Down
2 changes: 1 addition & 1 deletion docs/_config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ collections:
exclude: [ "CNAME" ]
permalink: /blog/:year/:month/:day/:title/index.:output_ext
production_url: https://www.fflint.org
title: FFLint
title: fflint
kramdown:
input: GFM
auto_ids: true
Expand Down
4 changes: 2 additions & 2 deletions docs/_includes/header.html
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<nav class="navbar navbar-expand-lg navbar-light bg-light">
<div class="container d-flex justify-content-between">
<a class="navbar-brand" href="/">
<img src="/favicon.svg" width="44" height="44" class="d-none d-sm-inline-block mx-2" alt="FFLint logo">
<span class="">FFLint</span>
<img src="/favicon.svg" width="44" height="44" class="d-none d-sm-inline-block mx-2" alt="fflint logo">
<span class="">fflint</span>
</a>
<ul class="navbar-nav navbar-expand-sm flex-row">
<li class="nav-item d-none d-md-block">
Expand Down
2 changes: 1 addition & 1 deletion docs/faq.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
title: FAQ - FFLint
title: FAQ - fflint
h1: Frequently Asked Questions
faq:
- q: How can I edit just the files with errors?
Expand Down
4 changes: 2 additions & 2 deletions docs/files.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,14 @@ fflint svg *.svg

## Use fflint's built-in expander

FFLint can expand wildcards similar to a shell, but with the addition of `**` to support zero or more directories (see [patterns](https://github.com/bmatcuk/doublestar/tree/v4#patterns) for details).
fflint can expand wildcards similar to a shell, but with the addition of `**` to support zero or more directories (see [patterns](https://github.com/bmatcuk/doublestar/tree/v4#patterns) for details).

Example (note the double quotes):
```
fflint svg "./**/*.svg"
```

If FFLint's built-in expand is causing conflicts, you can use the `--glob` flag to change it:
If fflint's built-in expand is causing conflicts, you can use the `--glob` flag to change it:
* `--glob=golang` - use an expander based on Go's `filepath.Glob`
* `--glob=none` - do not do any expansion

Expand Down
4 changes: 2 additions & 2 deletions docs/index.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
---
title: "FFLint - a linter to make sure your files are valid!"
title: "fflint - a linter to make sure your files are valid!"
h1: File Format Lint
---
FFLint is a <a href="https://en.wikipedia.org/wiki/Lint_(software)">linter</a> for file formats. Are your files:
*fflint* is a <a href="https://en.wikipedia.org/wiki/Lint_(software)">linter</a> for file formats. Are your files:

* in the correct format?
* with the correct extension?
Expand Down
4 changes: 2 additions & 2 deletions docs/install.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: Installation - FFLint
h1: Installing FFLint
title: Installation - fflint
h1: Installing fflint
---

The [latest releases](https://github.com/FileFormatInfo/fflint/releases/latest) are on Github.
Expand Down
2 changes: 1 addition & 1 deletion docs/pricing.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
title: Pricing
---

FFLint is free software and you are welcome to use it without paying. If you cannot agree to the terms of the [license](/license.html), you will need to pay.
fflint is free software and you are welcome to use it without paying. If you cannot agree to the terms of the [license](/license.html), you will need to pay.

Please note: email support is best-effort. I generally respond within a few days.

Expand Down
2 changes: 1 addition & 1 deletion docs/usage.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
title: Usage
---

See [installation](install.html) for how to download and install FFLint.
See [installation](install.html) for how to download and install *fflint*.

See [commands](/commands/index.html) for the list of supported file formats.

Expand Down
2 changes: 1 addition & 1 deletion internal/command/version.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ var versionCmd = &cobra.Command{
versionJSON, _ := json.Marshal(vi)
fmt.Println(string(versionJSON))
} else if shared.OutputFormat.String() == "text" {
fmt.Printf("FFLint v%s (%s)\n", vi.Version, vi.LastMod)
fmt.Printf("fflint v%s (%s)\n", vi.Version, vi.LastMod)
if shared.Debug {
fmt.Printf("\tCommit: %s\n\tBuilder: %s\n", vi.Commit, vi.Builder)
}
Expand Down
7 changes: 5 additions & 2 deletions internal/online/jsonp.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,12 @@ package online
import (
"encoding/json"
"net/http"
"regexp"
)

func WriteJsonp(w http.ResponseWriter, r *http.Request, v interface{}) {
var cbRegex = regexp.MustCompile(`^[a-zA-Z_$]+[a-zA-Z0-9_$]*$`)

func WriteJsonp(w http.ResponseWriter, r *http.Request, v interface{}) {
callback := r.URL.Query().Get("callback")

var b []byte
Expand All @@ -16,7 +18,8 @@ func WriteJsonp(w http.ResponseWriter, r *http.Request, v interface{}) {
b = []byte("{\"success\":false,\"message\":\"json.Marshal failed\"}")
}

if callback > "" {
// Check for valid callback name
if cbRegex.MatchString(callback) {
w.Header().Set("Content-Type", "application/javascript")
w.Write([]byte(callback))
w.Write([]byte("("))
Expand Down
2 changes: 1 addition & 1 deletion run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,4 @@ rm -rf ./fflint
go build -o ./fflint cmd/fflint/main.go
export PATH=$PATH:$(pwd)
fflint version
go test -timeout 30s -run "^TestFFLint$" github.com/FileFormatInfo/fflint/cmd/fflint
go test -timeout 30s -run "^Testfflint$" github.com/FileFormatInfo/fflint/cmd/fflint

0 comments on commit 8cf84c9

Please sign in to comment.