Giter Site home page Giter Site logo

sanctuary-scripts's People

Contributors

avaq avatar davidchambers avatar wuweiss avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

sanctuary-scripts's Issues

lint-readme: insert semicolons more discerningly

The script (see below) that rewrites code blocks for linting should be smarter about inserting semicolons, so that the linter will not complain about misplaced semicolons.

rewrite() {
local state=
local line
while IFS='' read -r line ; do
local a="${line:0:1}"
local b="${line:1:1}"
local z="${line: -1}"
if [[ $a$b == '> ' ]] ; then
printf '\n%s' "${line:2}"
state=input
elif [[ -n $state && $a$b == '. ' ]] ; then
printf '\n%s' "${line:2}"
elif [[ $state == input && $a$z == '{}' ]] ; then
printf ';\n%s' "($line)"
state=output
elif [[ $state == input ]] ; then
printf ';\n%s' "$line"
state=output
elif [[ $state == output ]] ; then
printf ';\n%s' "$line"
state=
else
printf '\n%s' "$line"
fi
done
}

See Avaq/permissionary#5 for discussion leading up to this.

prepublish script modifies file permissions

https://github.com/sanctuary-js/sanctuary-scripts/blob/v1.2.0/bin/prepublish#L22-L26:

for file in "${files[@]}" $(find test -name '*.js' | sort) ; do
  sed "s/ version = '.*';/ version = '$VERSION';/" "$file" >"$file.updated"
  mv -- "$file.updated" "$file"
  git add -- "$file"
done

This code can also modify line endings, as davidchambers/doctest@03e2852 demonstrates.

Let's remove this troublesome code. Projects which need this functionality can include a similar snippet in scripts/prepublish.

lint-commit-messages does not work by default on Travis CI

Travis CI only checks out the feature branch, so git log --no-merges --format=%s master.. returns no results.

I see two possible solutions:

  • document Travis CI configuration for checking out the default branch; or
  • compare to the remote's default branch rather than to the local repository's default branch.

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.