]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
badwords: fix two exceptions and drop them
authorViktor Szakats <commit@vsz.me>
Fri, 14 Nov 2025 15:58:05 +0000 (16:58 +0100)
committerViktor Szakats <commit@vsz.me>
Fri, 14 Nov 2025 16:32:04 +0000 (17:32 +0100)
Also:
- extend `dir` rule to exclude C assignments.

Closes #19532

13 files changed:
.github/scripts/badwords.txt
.github/workflows/checksrc.yml
lib/ftp.h
lib/http_aws_sigv4.c
lib/urldata.h
lib/vssh/libssh.c
lib/vssh/libssh2.c
lib/vssh/ssh.h
src/tool_cfgable.h
src/tool_ipfs.c
src/tool_operate.c
src/tool_operhlp.c
src/tool_writeout.h

index 7f6bca32b6a6193b58252f4676539ebcdde06faa..705c54fbac9136c2cbe10e537c3149739c7c083f 100644 (file)
@@ -45,7 +45,7 @@ there's:there is
 ^(And|So|But) = Rewrite it somehow?
 \. But: Rewrite it somehow?
 \. So : Rewrite without "so" ?
- dir :directory
+ dir [^=]:directory
 sub-director:subdirector
 you'd:you would
 you'll:you will
index 94407ff6774c2f7949ed14570a058a2821482b80..663811ef935d6072485f1f39d923ac669546a493 100644 (file)
@@ -176,4 +176,4 @@ jobs:
 
       # we allow some extra in source code
       - name: 'badwords'
-        run: grep -Ev '(\\bwill| url | dir )' .github/scripts/badwords.txt | .github/scripts/badwords.pl src lib include
+        run: grep -Ev '(\\bwill)' .github/scripts/badwords.txt | .github/scripts/badwords.pl src lib include
index 8d5f9c203147a99554d0f9351726060adf20299e..f4ddb1a37cc3943e55ca8d7f9ea61856f84d5f99 100644 (file)
--- a/lib/ftp.h
+++ b/lib/ftp.h
@@ -61,11 +61,11 @@ enum {
   FTP_STOR_PREQUOTE,
   FTP_LIST_PREQUOTE,
   FTP_POSTQUOTE,
-  FTP_CWD,  /* change dir */
-  FTP_MKD,  /* if the dir did not exist */
+  FTP_CWD,  /* change directory */
+  FTP_MKD,  /* if the directory did not exist */
   FTP_MDTM, /* to figure out the datestamp */
   FTP_TYPE, /* to set type when doing a head-like request */
-  FTP_LIST_TYPE, /* set type when about to do a dir list */
+  FTP_LIST_TYPE, /* set type when about to do a directory list */
   FTP_RETR_LIST_TYPE,
   FTP_RETR_TYPE, /* set type when about to RETR a file */
   FTP_STOR_TYPE, /* set type when about to STOR a file */
index b5601f45a2cb77e27641f3017e2d71c5500fc8af..d3d4760be780b0f71e8648f403d3ed829aa306c6 100644 (file)
@@ -1141,10 +1141,10 @@ static CURLcode http_aws_decode_encode(const char *in, size_t in_len,
 static bool should_urlencode(struct Curl_str *service_name)
 {
   /*
-   * These services require unmodified (not additionally url encoded) URL
+   * These services require unmodified (not additionally URL-encoded) URL
    * paths.
    * should_urlencode == true is equivalent to should_urlencode_uri_path
-   * from the AWS SDK. Urls are already normalized by the curl url parser
+   * from the AWS SDK. Urls are already normalized by the curl URL parser
    */
 
   if(curlx_str_cmp(service_name, "s3") ||
index f92bfcb3b2a81b7b679cc47e5c445e4cac3269fd..4b112e7072ddcfb72218ecd61ebed125e1d5181c 100644 (file)
@@ -238,7 +238,7 @@ struct ssl_backend_data;
 struct Curl_ssl_scache_entry;
 
 struct ssl_primary_config {
-  char *CApath;          /* certificate dir (does not work on Windows) */
+  char *CApath;          /* certificate directory (does not work on Windows) */
   char *CAfile;          /* certificate to verify peer against */
   char *issuercert;      /* optional issuer certificate filename */
   char *clientcert;
index 07036f900a5c8cd73468985c97d4cbad497d7114..74a1da5a3e7af987bcf195d194d070b5bc334685 100644 (file)
@@ -1677,7 +1677,7 @@ static int myssh_in_SFTP_QUOTE(struct Curl_easy *data,
   else if(!strncmp(cmd, "mkdir ", 6)) {
     if(*cp)
       return return_quote_error(data, sshc);
-    /* create dir */
+    /* create directory */
     myssh_to(data, sshc, SSH_SFTP_QUOTE_MKDIR);
     return SSH_NO_ERROR;
   }
@@ -1703,7 +1703,7 @@ static int myssh_in_SFTP_QUOTE(struct Curl_easy *data,
     return SSH_NO_ERROR;
   }
   else if(!strncmp(cmd, "rmdir ", 6)) {
-    /* delete dir */
+    /* delete directory */
     if(*cp)
       return return_quote_error(data, sshc);
     myssh_to(data, sshc, SSH_SFTP_QUOTE_RMDIR);
@@ -2157,9 +2157,9 @@ static CURLcode myssh_statemach_act(struct Curl_easy *data,
       ++sshc->slash_pos;
       if(rc < 0) {
         /*
-         * Abort if failure was not that the dir already exists or the
-         * permission was denied (creation might succeed further down the
-         * path) - retry on unspecific FAILURE also
+         * Abort if failure was not that the directory already exists or
+         * the permission was denied (creation might succeed further down
+         * the path) - retry on unspecific FAILURE also
          */
         err = sftp_get_error(sshc->sftp_session);
         if((err != SSH_FX_FILE_ALREADY_EXISTS) &&
@@ -2744,7 +2744,7 @@ static CURLcode myssh_do_it(struct Curl_easy *data, bool *done)
   data->req.size = -1;          /* make sure this is unknown at this point */
 
   sshc->actualcode = CURLE_OK;  /* reset error code */
-  sshc->secondCreateDirs = 0;   /* reset the create dir attempt state
+  sshc->secondCreateDirs = 0;   /* reset the create directory attempt state
                                    variable */
 
   Curl_pgrsSetUploadCounter(data, 0);
index b414dfcf2d60b3ecaa3bd9fc537c40e78a16c7b4..49044669fc066e79cf12d8475d62f8ad61724fda 100644 (file)
@@ -957,7 +957,7 @@ static CURLcode sftp_quote(struct Curl_easy *data,
   else if(!strncmp(cmd, "mkdir ", 6)) {
     if(*cp)
       return_quote_error(data, sshc);
-    /* create dir */
+    /* create directory */
     myssh_state(data, sshc, SSH_SFTP_QUOTE_MKDIR);
     return result;
   }
@@ -980,7 +980,7 @@ static CURLcode sftp_quote(struct Curl_easy *data,
   else if(!strncmp(cmd, "rmdir ", 6)) {
     if(*cp)
       return_quote_error(data, sshc);
-    /* delete dir */
+    /* delete directory */
     myssh_state(data, sshc, SSH_SFTP_QUOTE_RMDIR);
     return result;
   }
@@ -2275,9 +2275,9 @@ static CURLcode ssh_state_sftp_create_dirs_mkdir(struct Curl_easy *data,
   ++sshc->slash_pos;
   if(rc < 0) {
     /*
-     * Abort if failure was not that the dir already exists or the
-     * permission was denied (creation might succeed further down the
-     * path) - retry on unspecific FAILURE also
+     * Abort if failure was not that the directory already exists or
+     * the permission was denied (creation might succeed further down
+     * the path) - retry on unspecific FAILURE also
      */
     unsigned long sftperr = libssh2_sftp_last_error(sshc->sftp_session);
     if((sftperr != LIBSSH2_FX_FILE_ALREADY_EXISTS) &&
@@ -3528,7 +3528,7 @@ static CURLcode ssh_do(struct Curl_easy *data, bool *done)
     return CURLE_FAILED_INIT;
 
   data->req.size = -1; /* make sure this is unknown at this point */
-  sshc->secondCreateDirs = 0;   /* reset the create dir attempt state
+  sshc->secondCreateDirs = 0;   /* reset the create directory attempt state
                                    variable */
 
   Curl_pgrsSetUploadCounter(data, 0);
index 9d03b52f407b4e5bc08585a452a701a4092ab204..5317351478fc047550acf75ae6f55e10d10bbc0b 100644 (file)
@@ -149,8 +149,8 @@ struct ssh_conn {
   char *quote_path1;          /* two generic pointers for the QUOTE stuff */
   char *quote_path2;
 
-  char *homedir;              /* when doing SFTP we figure out home dir in the
-                                 connect phase */
+  char *homedir;              /* when doing SFTP we figure out home directory
+                                 in the connect phase */
   /* end of READDIR stuff */
 
   int secondCreateDirs;         /* counter use by the code to see if the
index 630f23fd9654625a466214177e2f47221ca47ee3..cac22483b7df102ccb3c65cfd4fd4a8437ca0f9a 100644 (file)
@@ -248,7 +248,7 @@ struct OperationConfig {
   BIT(autoreferer);         /* automatically set referer */
   BIT(show_headers);        /* show headers to data output */
   BIT(no_body);             /* do not get the body */
-  BIT(dirlistonly);         /* only get the FTP dir list */
+  BIT(dirlistonly);         /* only get the FTP directory list */
   BIT(unrestricted_auth);   /* Continue to send authentication (user+password)
                                when following redirects, even when hostname
                                changed */
index 89d12fc1c6a53df6dc1aa38a86de7a668397785c..0214a2004f1ef46f36f5acc898b6731e110fceb5 100644 (file)
@@ -176,7 +176,7 @@ CURLcode ipfs_url_rewrite(CURLU *uh, const char *protocol, char **url,
     goto clean;
   /* inputpath might be NULL or a valid pointer now */
 
-  /* set gateway parts in input url */
+  /* set gateway parts in input URL */
   if(curl_url_set(uh, CURLUPART_SCHEME, gwscheme, CURLU_URLENCODE) ||
      curl_url_set(uh, CURLUPART_HOST, gwhost, CURLU_URLENCODE) ||
      curl_url_set(uh, CURLUPART_PORT, gwport, CURLU_URLENCODE))
index 9aee520f06199776aca5e5ee45f4a59ec3ff0d64..1317e735510d1047fbc2093814e45a1cf9f63ae9 100644 (file)
@@ -2123,7 +2123,7 @@ static CURLcode transfer_per_config(struct OperationConfig *config,
   CURLcode result;
   *added = FALSE;
 
-  /* Check we have a url */
+  /* Check we have a URL */
   if(!config->url_list || !config->url_list->url) {
     helpf("(%d) no URL specified", CURLE_FAILED_INIT);
     result = CURLE_FAILED_INIT;
index a8323905408992bf6cab63338790e5deab1c6953..d25fccf46c6d02eb5b20061a1a988f3a075fe82d 100644 (file)
@@ -80,7 +80,7 @@ CURLcode urlerr_cvt(CURLUcode ucode)
 
 /*
  * Adds the filename to the URL if it does not already have one.
- * url will be freed before return if the returned pointer is different
+ * URL will be freed before return if the returned pointer is different
  */
 CURLcode add_file_name_to_url(CURL *curl, char **inurlp, const char *filename)
 {
index eebfde03b26a67547818624100ec4379f3581249..70b3cd148b56bf933b395943828e91b3222c63f3 100644 (file)
@@ -56,7 +56,7 @@ typedef enum {
   VAR_INPUT_URLQUERY,
   VAR_INPUT_URLFRAGMENT,
   VAR_INPUT_URLZONEID,
-  /* the same ones again for url *effective* */
+  /* the same ones again for URL *effective* */
   VAR_INPUT_URLESCHEME, /* keep this the first URLE* variable */
   VAR_INPUT_URLEUSER,
   VAR_INPUT_URLEPASSWORD,