Skip to content

Commit

Permalink
codespell github action
Browse files Browse the repository at this point in the history
  • Loading branch information
netblue30 committed Mar 5, 2023
1 parent 60fb6e3 commit d78fc96
Show file tree
Hide file tree
Showing 11 changed files with 31 additions and 42 deletions.
15 changes: 15 additions & 0 deletions .github/workflows/build-extra.yml
Original file line number Diff line number Diff line change
Expand Up @@ -120,3 +120,18 @@ jobs:
run: sudo apt-get install cppcheck
- name: cppcheck
run: cppcheck -q --force --error-exitcode=1 --enable=warning,performance .
codespell:
runs-on: ubuntu-22.04
steps:
- name: Harden Runner
uses: step-security/harden-runner@c8454efe5d0bdefd25384362fe217428ca277d57
with:
egress-policy: block
allowed-endpoints: >
azure.archive.ubuntu.com:80
github.com:443
- uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c
- name: install dependencies
run: sudo apt-get install codespell
- name: codespell
run: make codespell
4 changes: 4 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -360,6 +360,10 @@ cppcheck: clean
scan-build: clean
NO_EXTRA_CFLAGS="yes" scan-build make

.PHONY: codespell
codespell: clean
codespell --ignore-regex "UE|creat|shotcut|ether" src test

#
# make test
#
Expand Down
3 changes: 2 additions & 1 deletion README
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ Amin Vakil (https://github.com/aminvakil)
Ammon Smith (https://github.com/ammongit)
- Add DBus filter rules specific to firefox-developer-edition
Andreas Hunkeler (https://github.com/Karneades)
- Add profile for offical Linux Teams application
- Add profile for official Linux Teams application
Andrey Alekseenko (https://github.com/al42and)
- fixing lintian warnings
- fixed Skype profile
Expand Down Expand Up @@ -688,6 +688,7 @@ LaurentGH (https://github.com/LaurentGH)
layderv (https://github.com/layderv)
- prevent sandbox name from containing only digits
- clean escape control characters from the command line
- check hostname syntax
lecso7 (https://github.com/lecso7)
- added goldendict profile
- allow evince to read .cbz file format
Expand Down
2 changes: 1 addition & 1 deletion src/firejail/arp.c
Original file line number Diff line number Diff line change
Expand Up @@ -299,7 +299,7 @@ static uint32_t arp_random(const char *dev, Bridge *br) {
return 0;
}

// go sequentially trough all IP addresses and assign the first one not in use
// go sequentially through all IP addresses and assign the first one not in use
static uint32_t arp_sequential(const char *dev, Bridge *br) {
assert(dev);
assert(br);
Expand Down
2 changes: 1 addition & 1 deletion src/firejail/ls.c
Original file line number Diff line number Diff line change
Expand Up @@ -381,7 +381,7 @@ void sandboxfs(int op, pid_t pid, const char *path1, const char *path2) {
errExit("ftruncate");

if (copy_file_by_fd(src, dest) != 0)
fwarning("an error occured during copying\n");
fwarning("an error occurred during copying\n");
close(src);
close(dest);
}
Expand Down
4 changes: 2 additions & 2 deletions src/firejail/usage.c
Original file line number Diff line number Diff line change
Expand Up @@ -200,8 +200,8 @@ static char *usage_str =
" --private=directory - use directory as user home.\n"
" --private-cache - temporary ~/.cache directory.\n"
" --private-home=file,directory - build a new user home in a temporary\n"
"\tfilesystem, and copy the files and directories in the list in\n"
"\tthe new home.\n"
"\tfilesystem, and copy the files and directories in the list in the\n"
"\tnew home.\n"
" --private-bin=file,file - build a new /bin in a temporary filesystem,\n"
"\tand copy the programs in the list.\n"
" --private-dev - create a new /dev directory with a small number of\n"
Expand Down
2 changes: 1 addition & 1 deletion src/firejail/util.c
Original file line number Diff line number Diff line change
Expand Up @@ -1323,7 +1323,7 @@ void close_all(int *keep_list, size_t sz) {
if (fd == dirfd(dir))
continue; // just postponed

// dont't close file descriptors in keep list
// don't close file descriptors in keep list
int keep = 0;
if (keep_list) {
size_t i;
Expand Down
2 changes: 1 addition & 1 deletion src/fnet/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ printf("\n");
else if (argc == 7 && strcmp(argv[1], "create") == 0 && strcmp(argv[2], "veth") == 0) {
// create veth pair and move one end in the the namespace
net_create_veth(argv[3], argv[4], atoi(argv[6]));
// connect the ohter veth end to the bridge ...
// connect the other veth end to the bridge ...
net_bridge_add_interface(argv[5], argv[3]);
// ... and bring it up
net_if_up(argv[3]);
Expand Down
2 changes: 1 addition & 1 deletion src/lib/firejail_user.c
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
*/

//
// Firejail access database inplementation
// Firejail access database implementation
//
// The database is a simple list of users allowed to run firejail SUID executable
// It is usually stored in /etc/firejail/firejail.users
Expand Down
6 changes: 3 additions & 3 deletions test/fcopy/src/a/b/file4
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ Lorem ipsum dolor sit amet, consectetur adipiscing elit. Etiam interdum at massa

Mauris ac quam vel purus volutpat semper eget a ante. Curabitur arcu nisl, dapibus ac lectus ac, porttitor fermentum metus. Aliquam et sem aliquam magna interdum ultricies at eu orci. Aenean tortor augue, volutpat nec magna nec, rutrum bibendum justo. Vivamus ex quam, auctor ut pellentesque mattis, aliquet a eros. Etiam ac lacus ac ante ullamcorper sollicitudin a quis orci. Suspendisse quis justo ac mauris cursus finibus quis at elit. Vestibulum elementum finibus diam, eget convallis purus aliquet et. Fusce fermentum ornare urna, non ornare nisl tincidunt consectetur. Donec et lacus vitae ex eleifend porttitor id ut odio. Quisque luctus eget lorem et sollicitudin.

Aliquam libero elit, finibus a nisl a, commodo viverra turpis. Nam pulvinar in est sit amet fermentum. Praesent scelerisque tempus lectus, ac porta elit sodales rutrum. Duis faucibus faucibus urna eget accumsan. Vivamus in turpis ut massa rhoncus pretium nec et lorem. Aenean at tellus eget metus porta ornare. Aliquam erat volutpat. Donec hendrerit a massa vel malesuada. Integer varius sapien et orci viverra pretium. In at velit aliquet, vulputate nisi lobortis, aliquam augue.
Aliquam libero elit, finibus a nisl a, commodo viverra turpis. Nam pulvinar in est sit amet fermentum. Praesent scelerisque tempus lectus, ac porta elit sodales rutrum. Duis faucibus faucibus urna eget accumsan. Vivamus in turpis ut massa rhoncus pretium nec et lorem. Aenean at tellus eget metus porta ornare. Aliquam erat volutpat. Donec hendrerit a massa vel malesuada. Integer sapien et orci viverra pretium. In at velit aliquet, vulputate nisi lobortis, aliquam augue.

Ut aliquam turpis ut lorem aliquam, in faucibus elit pulvinar. Vivamus viverra tortor ornare, lacinia leo sit amet, auctor arcu. Sed erat leo, pellentesque vel nibh a, malesuada vehicula purus. Vivamus est dolor, aliquet quis facilisis fermentum, varius in dolor. Nunc quis libero feugiat, imperdiet est vitae, mollis risus. Vestibulum elementum mattis lorem vitae gravida. Nullam id tellus interdum, aliquam erat eu, laoreet nunc. Aliquam ut felis vel mauris maximus pellentesque.
Ut aliquam turpis ut lorem aliquam, in faucibus elit pulvinar. Vivamus viverra tortor ornare, lacinia leo sit amet, auctor arcu. Sed erat leo, pellentesque vel nibh a, malesuada vehicula purus. Vivamus est dolor, aliquet quis facilisis fermentum, in dolor. Nunc quis libero feugiat, imperdiet est vitae, mollis risus. Vestibulum elementum mattis lorem vitae gravida. Nullam id tellus interdum, aliquam erat eu, laoreet nunc. Aliquam ut felis vel mauris maximus pellentesque.

Vestibulum tempus mauris eget ex interdum, vitae vehicula tortor sollicitudin. Pellentesque et dolor cursus dui vulputate laoreet. Morbi eu bibendum quam, at ultrices elit. Vestibulum dictum enim sit amet ultricies imperdiet. Praesent congue magna ac mauris mattis, a iaculis ante aliquet. Vivamus at egestas ex. Suspendisse orci dolor, pharetra at aliquam a, faucibus facilisis leo. Quisque semper lorem eget elit commodo pretium. Aenean posuere augue quis arcu finibus, sit amet fringilla risus congue. Pellentesque rutrum nunc leo, aliquam lobortis lacus molestie nec. Donec convallis congue diam, ullamcorper vestibulum dui varius nec. Praesent pellentesque nisi risus. In aliquam molestie malesuada. Nulla facilisis a risus eu tristique. Morbi molestie et arcu quis efficitur. Curabitur cursus vestibulum luctus.
Vestibulum tempus mauris eget ex interdum, vitae vehicula tortor sollicitudin. Pellentesque et dolor cursus dui vulputate laoreet. Morbi eu bibendum quam, at ultrices elit. Vestibulum dictum enim sit amet ultricies imperdiet. Praesent congue magna ac mauris mattis, a iaculis ante aliquet. Vivamus at egestas ex. Suspendisse orci dolor, pharetra at aliquam a, faucibus facilisis leo. Quisque semper lorem eget elit commodo pretium. Aenean posuere augue quis arcu finibus, sit amet fringilla risus congue. Pellentesque rutrum nunc leo, aliquam lobortis lacus molestie nec. Donec convallis congue diam, ullamcorper vestibulum dui nec. Praesent pellentesque nisi risus. In aliquam molestie malesuada. Nulla facilisis a risus eu tristique. Morbi molestie et arcu quis efficitur. Curabitur cursus vestibulum luctus.
31 changes: 0 additions & 31 deletions test/network/configure

This file was deleted.

1 comment on commit d78fc96

@kmk3
Copy link
Collaborator

@kmk3 kmk3 commented on d78fc96 Mar 6, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice, I've seen codespell being used in other projects as well.

+1 for putting the logic in the makefile and using just make foo in CI.

Kind of interesting that it changed the lorem ipsum text.

codespell github action

Just to clarify, this is a normal CI job (which is great); a GitHub Action is
what appears in used:, such as these ones:

uses: step-security/harden-runner@c8454efe5d0bdefd25384362fe217428ca277d57
uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c

They may be proprietary (and/or use proprietary components) and some of them
are only able to run inside of GitHub CI (that is, they cannot simply be
executed locally).

Please sign in to comment.