diff options
author | Tim Smith <tsmith@chef.io> | 2020-06-23 15:34:12 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-06-23 15:34:12 -0700 |
commit | 3a128d59749b4af0e47b468210c479300d4b4eb9 (patch) | |
tree | 3b3cb17896f87eda74fa12405008576e651fc015 | |
parent | 918edfa296b0fbfea01a8ac8922c1fd1b9af8de3 (diff) | |
parent | a28196d93f657b3cda0db60056b3fde094529ff4 (diff) | |
download | chef-3a128d59749b4af0e47b468210c479300d4b4eb9.tar.gz |
Merge pull request #10021 from chef/cspell_common_dict
Setup cspell to pull from our common dictionary
-rw-r--r-- | .gitignore | 3 | ||||
-rw-r--r-- | CHANGELOG.md | 6 | ||||
-rw-r--r-- | RELEASE_NOTES.md | 6 | ||||
-rw-r--r-- | Rakefile | 17 | ||||
-rw-r--r-- | cspell.json | 209 | ||||
-rw-r--r-- | lib/chef/file_access_control/windows.rb | 4 | ||||
-rw-r--r-- | lib/chef/file_content_management/deploy/mv_unix.rb | 2 | ||||
-rw-r--r-- | lib/chef/http.rb | 2 | ||||
-rw-r--r-- | lib/chef/knife/core/bootstrap_context.rb | 2 | ||||
-rw-r--r-- | lib/chef/knife/core/windows_bootstrap_context.rb | 2 | ||||
-rw-r--r-- | lib/chef/resource/dmg_package.rb | 2 | ||||
-rw-r--r-- | lib/chef/resource/launchd.rb | 2 | ||||
-rw-r--r-- | spec/unit/knife/cookbook_show_spec.rb | 1 | ||||
-rw-r--r-- | tasks/spellcheck.rb | 34 |
14 files changed, 144 insertions, 148 deletions
diff --git a/.gitignore b/.gitignore index 52705a76ef..df2d678539 100644 --- a/.gitignore +++ b/.gitignore @@ -87,3 +87,6 @@ ext/win32-eventlog/mkmf.log # ignore byebug command history file. .byebug_history + +# our custom dictionary pulled from https://github.com/chef/chef_dictionary/ +chef_dictionary.txt
\ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md index cb4dc1b984..a6599143c1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -162,7 +162,7 @@ - Another round of description updates && Docs generator tweaks [#9778](https://github.com/chef/chef/pull/9778) ([tas50](https://github.com/tas50)) - Fix failing RHEL 6 kitchen tests [#9740](https://github.com/chef/chef/pull/9740) ([tas50](https://github.com/tas50)) - Fix windows package super bug and cleanup [#9790](https://github.com/chef/chef/pull/9790) ([lamont-granquist](https://github.com/lamont-granquist)) -- Fix required errors in apt_preference and systctl resources [#9791](https://github.com/chef/chef/pull/9791) ([tas50](https://github.com/tas50)) +- Fix required errors in apt_preference and sysctl resources [#9791](https://github.com/chef/chef/pull/9791) ([tas50](https://github.com/tas50)) - fix Habitat Windows package build [#9739](https://github.com/chef/chef/pull/9739) ([robbkidd](https://github.com/robbkidd)) - Fix failures in the cron_d resource :remove action [#9794](https://github.com/chef/chef/pull/9794) ([tas50](https://github.com/tas50)) @@ -1130,7 +1130,7 @@ - Update license scout to 1.0.22 [#8131](https://github.com/chef/chef/pull/8131) ([tas50](https://github.com/tas50)) - Backport various name_property fixes in resources from Chef 15 [#8134](https://github.com/chef/chef/pull/8134) ([tas50](https://github.com/tas50)) - Allow for mixlib-archive 1.x [#8141](https://github.com/chef/chef/pull/8141) ([tas50](https://github.com/tas50)) -- systctl: Allow slashes in key or block name [#8142](https://github.com/chef/chef/pull/8142) ([tas50](https://github.com/tas50)) +- sysctl: Allow slashes in key or block name [#8142](https://github.com/chef/chef/pull/8142) ([tas50](https://github.com/tas50)) - homebrew_cask: Ensure the resource is fully idempotent [#8143](https://github.com/chef/chef/pull/8143) ([tas50](https://github.com/tas50)) ## [v14.8.12](https://github.com/chef/chef/tree/v14.8.12) (2018-12-13) @@ -3295,7 +3295,7 @@ of partial templates. * windows_user: look up username instead of resource name (Issue #1705) * Remove the unused bootstrap templates that install chef from rubygems * Remove the Chef 10 functionality from bootstrap. -* Deprecate --distro / --template_file options in favor of --boostrap-template +* Deprecate --distro / --template_file options in favor of --bootstrap-template * Add `:node_ssl_verify_mode` & `:node_verify_api_cert` options to bootstrap to be able to configure these settings on the bootstrapped node. * Add partial_search dsl method to Chef::Search::Query, add result filtering to search. diff --git a/RELEASE_NOTES.md b/RELEASE_NOTES.md index 7bffda017a..5ca8fda4bf 100644 --- a/RELEASE_NOTES.md +++ b/RELEASE_NOTES.md @@ -727,7 +727,7 @@ Several legacy Windows helpers have been deprecated as they will always return t - Resolved a regression that prevented the `service` resource from working correctly on Windows. Thanks [@Axuba](https://github.com/Axuba) - Implemented VMware and Hyper-V detection on Linux systems -- Implemented VMware, Hyper-V, Virtualbox, KVM and Xen detection on Windows systems +- Implemented VMware, Hyper-V, VirtualBox, KVM and Xen detection on Windows systems - Added helpers `virtual_system?` and `physical_system?`. Thanks [@tecracer-theinen](https://github.com/tecracer-theinen) ## Ohai 15.9 @@ -1072,7 +1072,7 @@ We've further optimized our install footprint and reduced the size of `/opt/chef ## filesystem2 Ohai Data on Windows -Ohai 15.6 includes new `node['filesystem2']` data on Windows hosts. Fileystem2 presents filesystem data by both mountpoint and by device name. This data structure matches that of the filesystem plugin on Linux and other *nix operating systems. Thanks [@jaymzh](https://github.com/jaymzh) for this new data structure. +Ohai 15.6 includes new `node['filesystem2']` data on Windows hosts. Filesystem2 presents filesystem data by both mountpoint and by device name. This data structure matches that of the filesystem plugin on Linux and other *nix operating systems. Thanks [@jaymzh](https://github.com/jaymzh) for this new data structure. # What's New in 15.5.15 @@ -2642,7 +2642,7 @@ The windows_package resource now supports setting the `sensitive` property to av ### sysctl -The sysctl resource will now update the on-disk `systctl.d` file even if the current sysctl value matches the desired value. +The sysctl resource will now update the on-disk `sysctl.d` file even if the current sysctl value matches the desired value. ### windows_task @@ -25,6 +25,7 @@ begin require_relative "tasks/dependencies" require_relative "tasks/announce" require_relative "tasks/docs" + require_relative "tasks/spellcheck" require_relative "lib/chef/dist" rescue LoadError => e puts "Skipping missing rake dep: #{e}" @@ -107,18 +108,4 @@ begin end rescue LoadError puts "yard is not available. bundle install first to make sure all dependencies are installed." -end - -namespace :spellcheck do - task :run do - sh 'cspell "**/*"' - end - - desc "List the unique unrecognized words in the project." - task :unknown_words do - sh 'cspell "**/*" --wordsOnly --no-summary | sort | uniq' - end -end - -desc "Run spellcheck on the project." -task spellcheck: "spellcheck:run" +end
\ No newline at end of file diff --git a/cspell.json b/cspell.json index ecebba32fb..ac59cb0e51 100644 --- a/cspell.json +++ b/cspell.json @@ -4,6 +4,14 @@ "version": "0.1", // language - current active spelling language "language": "en", + "dictionaryDefinitions": [ + { + "name": "chef", + "file": "./chef_dictionary.txt", + "description": "Custom Chef Dictionary" + } + ], + "dictionaries": ["chef"], // words - list of words to be always considered correct "words": [ "aarch", @@ -14,7 +22,6 @@ "ACLs", "ACPI", "activationkey", - "activesupport", "ADAP", "addlock", "addrs", @@ -27,6 +34,7 @@ "agrs", "airgapped", "aixinit", + "aklyachkin", "Akzhan", "Alam", "Albenzi", @@ -36,23 +44,16 @@ "Alloc", "allowselfservice", "allprofiles", - "ALLUSERSPROFILE", "alnum", "alwayslastline", "amazonec", "amazonlinux", - "americanhanko", "anewb", - "angrychef", "anonymized", "Antergos", "APISSL", - "apparmor", - "appbundled", - "appbundler", "applewood", "Appscript", - "appx", "ARCHITEW", "archq", "argdup", @@ -62,10 +63,10 @@ "ARPHELPLINK", "ARPPRODUCTICON", "arry", - "artem", - "Artifactory", "Arțăriși", + "artem", "asdf", + "Ásgeirsson", "Ashwini", "ASSIGNPRIMARYTOKEN", "astoltz", @@ -77,7 +78,6 @@ "AUTHN", "AUTHROOT", "AUTHZ", - "autoconf", "Autoconverted", "AUTODATASEG", "autodetect", @@ -106,8 +106,8 @@ "BACKOFFICE", "backport", "backported", - "Backporting", "backporting", + "Backporting", "backslashing", "backtrace", "backtraces", @@ -123,24 +123,14 @@ "basepath", "basestring", "baseurls", - "Bastien", "bcast", "Benesch", - "Berksfile", - "Berkshelf", - "BGINFO", - "bginfo", "Bianco", "bigip", - "bindir", - "bindirs", "binfile", "binlink", "binmode", "binread", - "binstub", - "binstubs", - "binutils", "bitmask", "bkup", "blockdev", @@ -164,8 +154,8 @@ "bufptr", "bufsize", "bugfix", - "Bugfixes", "bugfixes", + "Bugfixes", "bugfixing", "bugok", "Buildkite", @@ -218,8 +208,8 @@ "chefdk", "cheffish", "cheffs", - "Chefignore", "chefignore", + "Chefignore", "chefignored", "chefignores", "chefscriptresult", @@ -235,8 +225,8 @@ "chilcote", "CHINESEBIG", "Chisamore", - "CHKCONFIG", "chkconfig", + "CHKCONFIG", "chmod", "choco", "Chouhan", @@ -258,13 +248,13 @@ "clientname", "CLOEXEC", "Cloke", - "Cloudera", "cloudera", - "Cmdlet", + "Cloudera", "cmdlet", + "Cmdlet", "cmdlets", - "CMDS", "cmds", + "CMDS", "Cmnd", "cname", "codepage", @@ -282,8 +272,8 @@ "computerlevel", "COMPUTERNAME", "computersystem", - "COMSPEC", "comspec", + "COMSPEC", "concat", "Cond", "confd", @@ -303,8 +293,8 @@ "convertto", "cookbookname", "cookiecurse", - "Cookstyle", "cookstyle", + "Cookstyle", "coookbook", "copypasta", "coreutils", @@ -324,7 +314,6 @@ "Crosta", "CRYPTOPROTECT", "CRYPTPROTECT", - "cscript", "cssh", "csshx", "csum", @@ -338,8 +327,9 @@ "Daemonization", "daemonize", "daemonized", - "Daemonizing", "daemonizing", + "Daemonizing", + "damacus", "danielfloyd", "Danna", "databag", @@ -379,6 +369,7 @@ "depsolved", "Depsolving", "derekgroh", + "Désarmes", "DESCR", "deserialization", "destdir", @@ -411,8 +402,8 @@ "disablerepo", "DISCARDABLE", "DISCARDNS", - "DISM", "dism", + "DISM", "displayname", "distro", "distros", @@ -424,8 +415,8 @@ "dockerignore", "dockerinit", "Doherty", - "Dokken", "dokken", + "Dokken", "domainandname", "domainname", "domainuser", @@ -456,18 +447,17 @@ "dup'd", "DUPEUX", "duvian", - "DWORD", "dword", + "DWORD", "DWORDLONG", "DYNALINK", "DYNLINK", - "Désarmes", "EACCES", "Eachern", "EASTEUROPE", "EBUSY", - "ECDSA", "ecdsa", + "ECDSA", "eckey", "ECONNREFUSED", "ECONNRESET", @@ -487,8 +477,8 @@ "enablement", "enablerepo", "encap", - "Encryptor", "encryptor", + "Encryptor", "endlocal", "ENOENT", "entriesread", @@ -509,10 +499,10 @@ "ESRCH", "etag", "etags", - "Etcd", "etcd", - "ETHTOOL", + "Etcd", "ethtool", + "ETHTOOL", "ETIMEDOUT", "euca", "Eugen", @@ -531,8 +521,8 @@ "EXTGLOB", "extname", "extrastuff", - "Exts", "exts", + "Exts", "FACs", "failburger", "FAILCRITICALERRORS", @@ -551,8 +541,8 @@ "fatals", "fauxhai", "featurename", - "FFLAGS", "fflags", + "FFLAGS", "Fichter", "fieldname", "Fileexists", @@ -580,17 +570,17 @@ "fnmatch", "fonttbl", "foobarbam", - "Foodcritic", "foodcritic", + "Foodcritic", "foorb", "FORCEMINIMIZE", "FORCEOFFFEEDBACK", "FORCEONFEEDBACK", - "Forwardable", "forwardable", + "Forwardable", "forwardslashes", - "FQDN", "fqdn", + "FQDN", "fqdns", "freakinhippie", "freebsd", @@ -605,8 +595,8 @@ "FULLSCREEN", "fuzzifier", "fuzzify", - "Fuzzyurl", "fuzzyurl", + "Fuzzyurl", "fzipi", "gaffneyc", "gecos", @@ -734,13 +724,13 @@ "HMODULE", "HMONITOR", "HOMEDRIVE", - "HOMEPATH", "homepath", + "HOMEPATH", "HOMESHARE", "Hongli", "hostnamectl", - "Hostnames", "hostnames", + "Hostnames", "hostport", "hostspec", "hostspecific", @@ -765,8 +755,8 @@ "hyperv", "icacls", "ichannel", - "ICMP", "icmp", + "ICMP", "iconlocation", "idempotence", "idempotency", @@ -775,8 +765,8 @@ "IEND", "iface", "ifcfg", - "Ifconfig", "ifconfig", + "Ifconfig", "ifdef", "IGNORECASE", "IHDR", @@ -787,8 +777,8 @@ "includedir", "includepkgs", "includer", - "Indentable", "indentable", + "Indentable", "indentt", "inet", "inetd", @@ -809,8 +799,8 @@ "inpipe", "INPORT", "inputformat", - "Inspec", "inspec", + "Inspec", "insserv", "installable", "INSTALLDIR", @@ -832,12 +822,12 @@ "invokereturnasis", "Ionuț", "IOPL", - "IPADDR", "ipaddr", + "IPADDR", "ipaddress", "Ippolito", - "Ipscopes", "ipscopes", + "Ipscopes", "ipsec", "iptables", "Ireton", @@ -885,8 +875,8 @@ "Kapil", "katello", "Kauppila", - "Kaustubh", "kaustubh", + "Kaustubh", "Keane", "keepalive", "keepalives", @@ -950,8 +940,8 @@ "LIBPATH", "libtool", "libvirt", - "Libxml", "libxml", + "Libxml", "libxslt", "libyaml", "lifecycle", @@ -1040,8 +1030,8 @@ "Magnus", "Maier", "mailservers", - "MAILSLOT", "mailslot", + "MAILSLOT", "mailto", "mainloop", "Mainmodule", @@ -1053,8 +1043,8 @@ "malloc", "Mandi", "mandriva", - "Mangeia", "mangeia", + "Mangeia", "Manjaro", "manpages", "Manyanza", @@ -1070,8 +1060,8 @@ "MAXDWORD", "mbrtowc", "mbtowc", - "Mdadm", "mdadm", + "Mdadm", "MDICHILD", "MEDIUMBUSINESS", "megamorf", @@ -1079,13 +1069,13 @@ "memlock", "memoizes", "memoizing", - "Merb", "merb", + "Merb", "merlinjim", "MESSAGEDEST", "MESSAGENAME", - "METAFILE", "metafile", + "METAFILE", "metalink", "Miah", "michaellihs", @@ -1102,15 +1092,15 @@ "mirrorlist", "mirrorlists", "MITM", - "Mixins", "mixins", + "Mixins", "mixlib", "mkdir", "mkgroup", "mkmf", "mkswap", - "MKTEMP", "mktemp", + "MKTEMP", "mktmpdir", "mname", "mntfs", @@ -1143,13 +1133,13 @@ "msys", "MSYSTEM", "Mtyj", - "MULTICAST", "Multicast", + "MULTICAST", "multiline", "multipackage", "multiplatform", - "Multiresource", "multiresource", + "Multiresource", "multitenant", "multithreaded", "Multiuser", @@ -1163,8 +1153,8 @@ "Mware", "myapp", "mycert", - "Mycook", "mycook", + "Mycook", "mycorp", "mydirectory", "myecrequest", @@ -1187,8 +1177,8 @@ "nagios", "nameservers", "namespacing", - "Nano", "nano", + "Nano", "Nathen", "nathwill", "NCRC", @@ -1249,8 +1239,8 @@ "NOGPFAULTERRORBOX", "nogpgcheck", "nokeys", - "Nokogiri", "nokogiri", + "Nokogiri", "NOLICPROMPT", "nologo", "NOLOGON", @@ -1263,8 +1253,8 @@ "nopasswd", "noprofile", "noprogressbar", - "NORESTART", "norestart", + "NORESTART", "nospace", "nospinner", "notapplicable", @@ -1291,8 +1281,8 @@ "objfs", "objs", "OEMCP", - "Ohai", "ohai", + "Ohai", "Ojeda", "oldguard", "OLDLOGLOCATION", @@ -1306,8 +1296,8 @@ "oneshot", "onidle", "onlogon", - "ONPARENT", "onparent", + "ONPARENT", "onstart", "openbsd", "openid", @@ -1315,8 +1305,8 @@ "opensolaris", "openssh", "openssl", - "Openstack", "openstack", + "Openstack", "opensuse", "opensuseleap", "openvpn", @@ -1349,8 +1339,8 @@ "parms", "passstr", "passw", - "Passwd", "passwd", + "Passwd", "passwordage", "passwordless", "PASSWORDNAME", @@ -1411,8 +1401,8 @@ "plutil", "PNAME", "Policybuilder", - "Policyfile", "policyfile", + "Policyfile", "Policyfiles", "POLICYNAME", "popen", @@ -1462,10 +1452,10 @@ "PROTSEQ", "PROTSEQS", "proxified", - "Proxifier", "proxifier", - "PSAPI", + "Proxifier", "psapi", + "PSAPI", "pschaumburg", "Pscx", "Psec", @@ -1518,8 +1508,8 @@ "RBAC", "rbag", "rbconfig", - "RBENV", "rbenv", + "RBENV", "rcscript", "rcvar", "rdoc", @@ -1530,8 +1520,8 @@ "realloc", "realname", "realpath", - "Rebooter", "rebooter", + "Rebooter", "rebootnow", "rebuilddb", "reconfig", @@ -1545,8 +1535,8 @@ "REDIRECTOR", "Redistributable", "redownloading", - "Reenable", "reenable", + "Reenable", "reenabled", "reenabling", "refcount", @@ -1589,8 +1579,8 @@ "retriable", "REXML", "rhash", - "RHEL", "rhel", + "RHEL", "rhosts", "rhscl", "rhsm", @@ -1626,8 +1616,8 @@ "rubyinstaller", "RUBYLIB", "RUBYOPT", - "Rubyzip", "rubyzip", + "Rubyzip", "Rudikza", "runas", "rundeck", @@ -1639,8 +1629,8 @@ "runlock", "runpid", "runrun", - "Runtimes", "runtimes", + "Runtimes", "RXACT", "rxhash", "rxvlan", @@ -1702,6 +1692,7 @@ "SETTINGCHANGE", "setuid", "SETX", + "sfiggins", "sftp", "Shamrell", "Sharad", @@ -1755,8 +1746,8 @@ "skus", "slapadd", "slapd", - "SLES", "sles", + "SLES", "Sliim", "SMALLBUSINESS", "SMARTCARD", @@ -1771,15 +1762,16 @@ "snapd", "Snapp", "snmp", - "Socketless", "socketless", - "Softlayer", + "Socketless", "softlayer", + "Softlayer", "softwareupdate", "Solaris", "SOLOEXEC", "Solr", "solv", + "Sölvi", "somedir", "somefile", "someotherfile", @@ -1815,16 +1807,16 @@ "STARTUPINFO", "stdcall", "stdlib", - "Stepable", "stepable", + "Stepable", "stopsrc", "strace", "Stratton", "strftime", "stringio", "strptime", - "Struct", "struct", + "Struct", "stubabble", "stubbable", "subclassable", @@ -1866,16 +1858,16 @@ "swapon", "swappable", "swappiness", - "Symlink", "symlink", + "Symlink", "symlinked", "symlinking", "symlinks", "sync", "syntaxcache", "sysadminctl", - "Sysconf", "sysconf", + "Sysconf", "sysconfig", "sysctl", "sysctld", @@ -1886,10 +1878,10 @@ "sysread", "systctl", "systemctl", - "Systemd", "systemd", - "SYSTEMDRIVE", + "Systemd", "systemdrive", + "SYSTEMDRIVE", "systemrestart", "SYSTEMROOT", "systemsetup", @@ -1897,7 +1889,6 @@ "SYSTEMSTART", "Systemtime", "syswrite", - "Sölvi", "Taddeo", "Tahoma", "TAKAHASHI", @@ -1970,8 +1961,8 @@ "udiff", "UHALF", "uids", - "UINT", "uint", + "UINT", "ulimit", "ulong", "ULONGLONG", @@ -1991,8 +1982,8 @@ "UNEXP", "UNEXPORTED", "unforked", - "Unformatter", "unformatter", + "Unformatter", "unhold", "unignored", "uninst", @@ -2022,8 +2013,8 @@ "untap", "untar", "untracked", - "Untrusted", "untrusted", + "Untrusted", "unversioned", "UNWRITABLE", "upcase", @@ -2088,14 +2079,10 @@ "VIOKBD", "Virender", "virt", - "Virtualbox", - "virtualbox", - "visudo", "Vitruvius", "Vitvitskiy", "vkhatri", "VLAN", - "vlan", "VMBUS", "vmware", "voidcmd", @@ -2138,8 +2125,8 @@ "winevt", "Winmgmt", "winmgmts", - "WINNT", "winnt", + "WINNT", "winprog", "winrm", "Winsor", @@ -2151,19 +2138,16 @@ "woot", "wordpress", "workdir", - "Workgroup", - "workgroup", "WPARAM", "wrlinux", - "Wrock", "WSCHILD", "wstring", "wtime", "xabcz", "Xabier", "xargs", - "XATTR", "xattr", + "XATTR", "xchar", "Xcode", "xdigit", @@ -2172,11 +2156,8 @@ "XFORM", "xinetd", "XMLHTTP", - "Xorima", "xproto", "Xtdate", - "yajl", - "yardoc", "yieldparam", "yocto", "yolo", @@ -2193,17 +2174,8 @@ "zmscwx", "zolo", "zombiejs", - "zoneinfo", - "Zpool", "Zuazo", - "Zygmuntowicz", - "zypp", - "Zypper", - "zypper", - "Ásgeirsson", - "damacus", - "sfiggins", - "aklyachkin" + "Zygmuntowicz" ], // flagWords - list of words to be always considered incorrect // This is useful for offensive words and common spelling errors. @@ -2226,7 +2198,8 @@ "lib/chef/provider/package/yum/simplejson/*", "omnibus/resources/chef/**/*", "kitchen-tests/cookbooks/end_to_end/files/*", - "spec/**" + "spec/**", + "docs_site" ], "ignoreRegExpList": [ // Ignore "'s" at the end of a word. If "Chef" is an accepted word, so is "Chef's". diff --git a/lib/chef/file_access_control/windows.rb b/lib/chef/file_access_control/windows.rb index e59df01047..118eae179c 100644 --- a/lib/chef/file_access_control/windows.rb +++ b/lib/chef/file_access_control/windows.rb @@ -96,7 +96,7 @@ class Chef self_ace.mask = securable_object.predict_rights_mask(target_ace.mask) new_target_acl << self_ace end - # As there is no inheritence needed in case of WRITE permissions. + # As there is no inheritance needed in case of WRITE permissions. if target_ace.mask != Chef::ReservedNames::Win32::API::Security::WRITE && target_ace.flags & (CONTAINER_INHERIT_ACE | OBJECT_INHERIT_ACE) != 0 children_ace = target_ace.dup children_ace.flags |= INHERIT_ONLY_ACE @@ -242,7 +242,7 @@ class Chef flags = 0 # - # Configure child inheritence only if the resource is some + # Configure child inheritance only if the resource is some # type of a directory. # if resource.is_a? Chef::Resource::Directory diff --git a/lib/chef/file_content_management/deploy/mv_unix.rb b/lib/chef/file_content_management/deploy/mv_unix.rb index 26de383e70..19345a2b26 100644 --- a/lib/chef/file_content_management/deploy/mv_unix.rb +++ b/lib/chef/file_content_management/deploy/mv_unix.rb @@ -51,7 +51,7 @@ class Chef # in the case where i'm running chef-solo on my homedir as myself and some root-shell # work has caused dotfiles of mine to change to root-owned, i'm fine with this not being # exceptional, and i think most use cases will consider this to not be exceptional, and - # the right thing is to fix the ownership of the file to the user running the commmand + # the right thing is to fix the ownership of the file to the user running the command # (which requires write perms to the directory, or mv will throw an exception) begin ::File.chown(uid, nil, src) diff --git a/lib/chef/http.rb b/lib/chef/http.rb index 2a21aef191..1777739a93 100644 --- a/lib/chef/http.rb +++ b/lib/chef/http.rb @@ -52,7 +52,7 @@ class Chef def handle_chunk(next_chunk) # stream handlers handle responses so must be applied in reverse order - # (same as #apply_stream_complete_middleware or #apply_response_midddleware) + # (same as #apply_stream_complete_middleware or #apply_response_middleware) @stream_handlers.reverse.inject(next_chunk) do |chunk, handler| Chef::Log.trace("Chef::HTTP::StreamHandler calling #{handler.class}#handle_chunk") handler.handle_chunk(chunk) diff --git a/lib/chef/knife/core/bootstrap_context.rb b/lib/chef/knife/core/bootstrap_context.rb index 7d99ea0d96..a70e463089 100644 --- a/lib/chef/knife/core/bootstrap_context.rb +++ b/lib/chef/knife/core/bootstrap_context.rb @@ -28,7 +28,7 @@ class Chef # bootstrap templates. For backwards compatibility, they +must+ set the # following instance variables: # * @config - a hash of knife's config values - # * @run_list - the run list for the node to boostrap + # * @run_list - the run list for the node to bootstrap # class BootstrapContext diff --git a/lib/chef/knife/core/windows_bootstrap_context.rb b/lib/chef/knife/core/windows_bootstrap_context.rb index f0b9021843..63d5ef9b51 100644 --- a/lib/chef/knife/core/windows_bootstrap_context.rb +++ b/lib/chef/knife/core/windows_bootstrap_context.rb @@ -27,7 +27,7 @@ class Chef # bootstrap templates. For backwards compatibility, they +must+ set the # following instance variables: # * @config - a hash of knife's config values - # * @run_list - the run list for the node to boostrap + # * @run_list - the run list for the node to bootstrap # class WindowsBootstrapContext < BootstrapContext attr_accessor :config diff --git a/lib/chef/resource/dmg_package.rb b/lib/chef/resource/dmg_package.rb index 1b996e4c5e..c6cd04156c 100644 --- a/lib/chef/resource/dmg_package.rb +++ b/lib/chef/resource/dmg_package.rb @@ -38,7 +38,7 @@ class Chef end ``` - **Install Virtualbox from the .mpkg**: + **Install VirtualBox from the .mpkg**: ```ruby dmg_package 'Virtualbox' do diff --git a/lib/chef/resource/launchd.rb b/lib/chef/resource/launchd.rb index f71abd8557..70ff7b8974 100644 --- a/lib/chef/resource/launchd.rb +++ b/lib/chef/resource/launchd.rb @@ -68,7 +68,7 @@ class Chef # check. According to `man 5 launchd.plist`: # StartCalendarInterval <dictionary of integers or array of dictionaries of integers> # ... Missing arguments are considered to be wildcard. - # What the man page doesn't state, but what was observed (OSX 10.11.5, launchctrl v3.4.0) + # What the man page doesn't state, but what was observed (OSX 10.11.5, launchctl v3.4.0) # Is that keys that are specified, but invalid, will also be treated as a wildcard # this means that an entry like: # { "Hour"=>0, "Weekday"=>"6-7"} diff --git a/spec/unit/knife/cookbook_show_spec.rb b/spec/unit/knife/cookbook_show_spec.rb index a9d43eb766..794447c4eb 100644 --- a/spec/unit/knife/cookbook_show_spec.rb +++ b/spec/unit/knife/cookbook_show_spec.rb @@ -16,7 +16,6 @@ # limitations under the License. # -# rename to cookbook not coookbook require "spec_helper" describe Chef::Knife::CookbookShow do diff --git a/tasks/spellcheck.rb b/tasks/spellcheck.rb new file mode 100644 index 0000000000..002518d9ee --- /dev/null +++ b/tasks/spellcheck.rb @@ -0,0 +1,34 @@ +# +# Copyright:: Copyright (c) Chef Software Inc. +# License:: Apache License, Version 2.0 +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +namespace :spellcheck do + task :fetch_common do + sh "wget https://raw.githubusercontent.com/chef/chef_dictionary/master/chef.txt -O chef_dictionary.txt" + end + + task run: :fetch_common do + sh 'cspell "**/*"' + end + + desc "List the unique unrecognized words in the project." + task unknown_words: :fetch_common do + sh 'cspell "**/*" --wordsOnly --no-summary | sort | uniq' + end +end + +desc "Run spellcheck on the project." +task spellcheck: "spellcheck:run" |