Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Patch for typos that get repeatedly added #197

Closed
k4rtik opened this issue Jan 21, 2022 · 2 comments
Closed

Patch for typos that get repeatedly added #197

k4rtik opened this issue Jan 21, 2022 · 2 comments

Comments

@k4rtik
Copy link
Contributor

k4rtik commented Jan 21, 2022

Hi @MSoegtropIMC

Since creating a PR triggers the CI, I am sharing a patch here for repeated typos that get added to generated files such as README's that I had not noticed earlier. I couldn't figure out an easy way to improve the CI on this repo to auto-detect these. Since you are about to make a new release, it might be a good time to apply this patch:

diff --git a/maintainer_scripts/create_readme.sh b/maintainer_scripts/create_readme.sh
index e77f5be..6025d2d 100755
--- a/maintainer_scripts/create_readme.sh
+++ b/maintainer_scripts/create_readme.sh
@@ -14,7 +14,7 @@
 # This script creates from an opam installation a README.md file with:
 # - name, version, synopsis and description of each primary package
 # - name, version, synopsis and description of each dependency package
-# - information about liceses, project homepages, ...
+# - information about licenses, project homepages, ...
 
 ##### Initialization #####
 
@@ -257,16 +257,16 @@ echo PACKAGES_ALL="${PACKAGES_ALL}"
 function html_package_opam {
   echo "Create README for $1"
 
-  # Get package informatop from opam
+  # Get package information from opam
   # Example output (with 2 license fields ...)
   # opam show "conf-adwaita-icon-theme" -f version:,license:,synopsis:,homepage:
   # version:  "1"
   # license:  "LGPL-3.0-only" "CC-BY-SA-3.0"
   # synopsis: "Virtual package relying on adwaita-icon-theme"
   # homepage: "https://github.com/GNOME/adwaita-icon-theme"
-  # Note: the process substition (rather than pipe) avoids a subshell, so that variables can be set.
+  # Note: the process substitution (rather than pipe) avoids a subshell, so that variables can be set.
   # Note: the declare -a var="(list)" makes it possible to convert a list of quoted strings to an array
-  unset pversion plicense psynopsis phomepage pbugreports pdescription pauthors preporsitory
+  unset pversion plicense psynopsis phomepage pbugreports pdescription pauthors prepository
   multiline=''
   while read var value
   do
@@ -278,7 +278,7 @@ function html_package_opam {
       bug-reports:) pbugreports="${value//\"}"; multiline='' ;;
       description:) pdescription="${value//\"}"; multiline='' ;;
       authors:)     pauthors="${value//\"}"; multiline=pauthors ;;
-      repository)   preporsitory="${value//\"}"; multiline='' ;;
+      repository)   prepository="${value//\"}"; multiline='' ;;
       *)
         if [ -n "$multiline" ] 
         then
@@ -329,7 +329,7 @@ function html_package_opam {
   fi
 
   # Look up the opam package URL
-  popam_url="$(opam_get_installed_opam_repo "${preporsitory}" "$1")"
+  popam_url="$(opam_get_installed_opam_repo "${prepository}" "$1")"
   if [ "${CHECKOPAMLINKS}" == 'Y' ] && ! check_url "${popam_url}"
   then
     echo "opam url '${popam_url}' for package '${package}' does not exist!" >> WARNINGS.log
@@ -401,7 +401,7 @@ below and verify that they are compatible with your intended use in case you
 plan to use these packages.
 
 **Note on license information:**
-The license information given below is obtianed from opam.
+The license information given below is obtained from opam.
 The Coq Platform team does no double check this information.
 
 **Note on multiple licenses:** 
@@ -459,7 +459,7 @@ developments.
 
 The packages in the **full level** are mature, well maintained
 and suitable as basis for your own developments.
-See the Coq Platform [charter](charter.md) for deatils.
+See the Coq Platform [charter](charter.md) for details.
 
 The **full level** contains the following packages:
 
@@ -520,7 +520,7 @@ done
 cat >> ${RESULT_FILE_MD} <<EOT
 <br>
 
-## **Dependecy packages**
+## **Dependency packages**
 
 In addition the dependencies listed below are partially or fully included or required during build time.
 Please note, that the version numbers given are the versions of opam packages,
diff --git a/maintainer_scripts/notify-upstream.sh b/maintainer_scripts/notify-upstream.sh
index ed0e827..fa1bbae 100755
--- a/maintainer_scripts/notify-upstream.sh
+++ b/maintainer_scripts/notify-upstream.sh
@@ -122,7 +122,7 @@ function opam_get_issue_url() {
 
 ########## User interaction ##########
 
-# Ask user for confirmationa multi option + cancel question
+# Ask user for confirmation multi option + cancel question
 # $1 message
 # $2 set of options as character sequence
 # The choice is stored in ${ANSWER}
@@ -150,7 +150,7 @@ function open_issue_tag() {
 The corresponding Coq Platform release ${VERSION_PLATFORM} should be released before ${DATE_PLATFORM_EXPECTED}.
 It can be delayed in case of difficulties until ${DATE_PLATFORM_LATEST}, but this should be an exception.
 
-This issue is to inform you that to our (possibly a few days old) best knoweldege the latest released version of your project (${LATEST_OPAM_VERSION}) does not work with Coq ${COQ_PLATFORM_COQ_BASE_VERSION}${EXT_RELEASE}.
+This issue is to inform you that to our (possibly a few days old) best knowledge the latest released version of your project (${LATEST_OPAM_VERSION}) does not work with Coq ${COQ_PLATFORM_COQ_BASE_VERSION}${EXT_RELEASE}.
 We tried to remove version restrictions in opam files and possibly make or configure files, but this did not suffice.
 
 Please note that in Coq Platform CI (unlike Coq CI) we test only released / tagged versions. ${COQ_CI_TEST_INFO}
@@ -264,7 +264,7 @@ function open_url {
     linux*)  xdg-open "$1" ;;
     darwin*) open "$1" ;;
     cygwin*) echo "TODO: unimplemented" ; return 1 ;;
-    *)       echo "ERROR: unsopported OS type '$OSTYPE'"; return 1 ;;
+    *)       echo "ERROR: unsupported OS type '$OSTYPE'"; return 1 ;;
   esac
 }
 
@@ -368,7 +368,7 @@ do
     fi
   fi
 
-  # Show avaliable versions in opam
+  # Show available versions in opam
   opam_versions="$(opam show -f all-versions ${package_main})"
   LATEST_OPAM_VERSION="$(echo "${opam_versions}" | sed 's/  */\n/g' | grep -v 'dev' | tail -n 1)"
   echo "OPAM versions:    ${opam_versions} [${LATEST_OPAM_VERSION}]"
diff --git a/shell_scripts/init_utilities.sh b/shell_scripts/init_utilities.sh
index 25e99cc..b8d1419 100644
--- a/shell_scripts/init_utilities.sh
+++ b/shell_scripts/init_utilities.sh
@@ -51,7 +51,7 @@ function check_command_available {
 # $2 option 1 keys (only first is shown - this is also the return value)
 # $3 option 1 text
 #
-# Example: ask_user_opt1_cancel "Disable sandbox (d) or cancel (c)?" dD "dsiable sandbox"
+# Example: ask_user_opt1_cancel "Disable sandbox (d) or cancel (c)?" dD "disable sandbox"
 # ------------------------------------------------------------------------------
 
 function ask_user_opt1_cancel {
diff --git a/windows/Coq.nsi b/windows/Coq.nsi
index 3e31422..70bfe9f 100644
--- a/windows/Coq.nsi
+++ b/windows/Coq.nsi
@@ -161,7 +161,7 @@ SectionEnd
 ; Inform user when sections are selected
 
 ; Parameters on the stack:
-; top-0 : section B on which section A dependends
+; top-0 : section B on which section A depends
 ; top-1 : section A, which depends on section B
 ; top-2 : name of section B
 ; top-3 : name of section A
@MSoegtropIMC
Copy link
Collaborator

Thanks, I applied your patch. Btw.: if you commit locally and create the patch with e.g. git format-patch HEAD~1, it will contain author information.

I would appreciate if you could supply a script in maintainer_scripts which does such checks.

@k4rtik
Copy link
Contributor Author

k4rtik commented Jan 21, 2022

if you commit locally and create the patch with e.g. git format-patch HEAD~1, it will contain author information.

That's good to know. With the workflow of PRs, I had completely forgotten about this option.

I will look into adding a script.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants