Skip to content

Commit

Permalink
Add missing docstring comments for check scripts (#1794)
Browse files Browse the repository at this point in the history
Related #1716. Stacked on
#1791.

This PR adds missing docstring comments to check-scripts. It also adds
missing `#` comment markers to leading blank lines in all docstring
comments, for consistency.

<a data-ca-tag
href="https://codeapprove.com/pr/tiny-pilot/tinypilot/1794"><img
src="https://codeapprove.com/external/github-tag-allbg.png" alt="Review
on CodeApprove" /></a>

---------

Co-authored-by: Jan Heuermann <[email protected]>
  • Loading branch information
jotaen4tinypilot and jotaen authored May 15, 2024
1 parent ef838a4 commit a444cbd
Show file tree
Hide file tree
Showing 19 changed files with 27 additions and 17 deletions.
2 changes: 1 addition & 1 deletion dev-scripts/build-debian-pkg
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/bin/bash

#
# Build TinyPilot Debian packages.
#
# Usage:
Expand Down
4 changes: 4 additions & 0 deletions dev-scripts/check-all
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
#!/bin/bash
#
# Executes all check scripts.
#
# It only skips `check-debian-pkg`, because that one has special prerequisites.

# Exit on first failure.
set -e
Expand Down
2 changes: 1 addition & 1 deletion dev-scripts/check-bash
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/bin/bash

#
# Run tests and static analysis on bash scripts.

# Exit on first failure.
Expand Down
2 changes: 1 addition & 1 deletion dev-scripts/check-for-init-py-files
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/bin/bash

#
# Test if __init__.py file exists in directory containing .py files.

# Exit on first failure.
Expand Down
2 changes: 2 additions & 0 deletions dev-scripts/check-javascript
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
#!/bin/bash
#
# Runs tests and static analysis on JavaScript files.

# Exit on first failure.
set -e
Expand Down
2 changes: 2 additions & 0 deletions dev-scripts/check-python
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
#!/bin/bash
#
# Runs tests and static analysis on Python files.

# Exit on first failure.
set -e
Expand Down
2 changes: 1 addition & 1 deletion dev-scripts/check-sql
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/bin/bash

#
# Checks for SQL script anti-patterns.

# Exit on first failure.
Expand Down
2 changes: 1 addition & 1 deletion dev-scripts/check-style
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/bin/bash

#
# Checks formatting for non-Python files.

# Exit on first failure.
Expand Down
2 changes: 1 addition & 1 deletion dev-scripts/check-trailing-newline
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/bin/bash

#
# Verify that all text files end in a trailing newline.

# Exit on first failing command.
Expand Down
2 changes: 1 addition & 1 deletion dev-scripts/check-trailing-whitespace
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/bin/bash

#
# Check for trailing whitespace

# Exit on first failing command.
Expand Down
2 changes: 1 addition & 1 deletion dev-scripts/decode-edid
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/bin/bash

#
# Decode the EDID from the TinyPilot install defaults.

# This script facilitates debugging the EDID and creates helpful logs of EDID
Expand Down
2 changes: 1 addition & 1 deletion dev-scripts/device/install-from-source
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/bin/bash

#
# Installs the local directory's version of TinyPilot's code onto the current
# system.
#
Expand Down
4 changes: 2 additions & 2 deletions dev-scripts/dump-logs
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
#!/bin/bash

#
# The canonical way to dump logs is through the script below,
# but this file is here for backwards compatibility.

#
# Without this file, we have no way of giving users a dump logs command
# that will work regardless of TinyPilot version.

Expand Down
2 changes: 1 addition & 1 deletion dev-scripts/enable-git-hooks
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/bin/bash

#
# Enables all git hooks for this project.

# Exit on first failure.
Expand Down
2 changes: 1 addition & 1 deletion dev-scripts/enable-mock-scripts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/bin/bash

#
# Creates a symlink from /opt/tinypilot-privileged/scripts to dev-scripts/mock-scripts
# to facilitate development on non-TinyPilot systems.

Expand Down
2 changes: 1 addition & 1 deletion dev-scripts/enable-multiarch-docker
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/bin/bash

#
# Configure Docker to support multiarch builds, allowing it to use QEMU to build
# images targeting different CPU architectures.

Expand Down
4 changes: 2 additions & 2 deletions dev-scripts/enable-passwordless-sudo
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
#!/bin/bash
#
# Enable passwordless sudo for paths that TinyPilot requires.

#
# Note: If you run with passwordless sudo enabled globally for your user
# account, you don't need to run this script.

#
# In production, TinyPilot has permission to run an allowlist of paths with sudo
# permissions. For developers who don't have passwordless sudo enabled globally
# for their user account, certain TinyPilot functionality will fail waiting on a
Expand Down
2 changes: 1 addition & 1 deletion dev-scripts/fix-style
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/bin/bash

#
# Fixes formatting for non-Python files.

# Exit on first failure.
Expand Down
2 changes: 2 additions & 0 deletions dev-scripts/serve-dev
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
#!/bin/bash
#
# Starts the backend server in development mode.

# Exit on first failure.
set -e
Expand Down

0 comments on commit a444cbd

Please sign in to comment.