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

src: fix typos #101

Merged
merged 1 commit into from
Oct 24, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/luacheck/builtin_standards/playdate.lua
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ local sample = {
-- JSON
local json = standards.def_fields("decode", "decodeFile", "encode", "encodePretty", "encodeToFile")

-- Text Alignement
-- Text Alignment
local kTextAlignment = standards.def_fields("left", "center", "right")

-- Playdate SDK
Expand Down
2 changes: 1 addition & 1 deletion src/luacheck/format.lua
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ local format = {}
local color_support = not utils.is_windows or os.getenv("ANSICON")

local function get_message_format(warning)
local message_format = assert(stages.warnings[warning.code], "Unkown warning code " .. warning.code).message_format
local message_format = assert(stages.warnings[warning.code], "Unknown warning code " .. warning.code).message_format

if type(message_format) == "function" then
return message_format(warning)
Expand Down
2 changes: 1 addition & 1 deletion src/luacheck/parser.lua
Original file line number Diff line number Diff line change
Expand Up @@ -900,7 +900,7 @@ local function parse_expression_statement(state)

if primary_expression.tag == "Call" or primary_expression.tag == "Invoke" then
if lhs then
-- The is an assingment, and a call is not valid in lhs.
-- The is an assignment, and a call is not valid in lhs.
parse_error(state, "expected call or indexing")
else
-- This is a call.
Expand Down
2 changes: 1 addition & 1 deletion src/luacheck/runner.lua
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ end

-- Normalizes inputs and filters inputs using `exclude_files` and `include_files` options.
-- Returns an array of prepared input tables.
-- Differences between normal and prepated inputs:
-- Differences between normal and prepared inputs:
-- * Prepared inputs can't have `rockspec_path` field.
-- * Prepared inputs can't have `path` pointing to a directory (unless it has an error).
-- * Prepared inputs have `filename` field if possible (copied from `path` if not given).
Expand Down
2 changes: 1 addition & 1 deletion src/luacheck/serializer.lua
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ local function max_n(t)
end

-- Serializes a value into buffer.
-- `strings` is a table mapping string values to where they first occured or to name of local
-- `strings` is a table mapping string values to where they first occurred or to name of local
-- variable used to represent it.
-- Array part contains representations of values saved into locals.
local function add_value(buffer, strings, value, level)
Expand Down
2 changes: 1 addition & 1 deletion src/luacheck/stages/detect_uninit_accesses.lua
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ local function detect_uninit_access_in_line(chstate, line)
for var, accessing_nodes in pairs(item_var_map) do
-- If there are no values at all reaching this access, not even the empty one,
-- this item (or a closure containing it) is not reachable from variable definition.
-- It will be reported as unreachable code, no need to report uninitalized accesses in it.
-- It will be reported as unreachable code, no need to report uninitialized accesses in it.
if item.used_values[var] then
-- If this variable is has only one, empty value then it's already reported as never set,
-- no need to report each access.
Expand Down
4 changes: 2 additions & 2 deletions src/luacheck/stages/linearize.lua
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ function Line:__init(node, parent, value)
self.accessed_upvalues = {}
-- Maps variables to arrays of mutating items.
self.mutated_upvalues = {}
-- Maps variables to arays of setting items.
-- Maps variables to arrays of setting items.
self.set_upvalues = {}
self.lines = {}
self.node = node
Expand Down Expand Up @@ -729,7 +729,7 @@ function LinState:scan_expr_Function(item, node)
end

-- Builds linear representation (line) of AST and assigns it as `chstate.top_line`.
-- Assings an array of all lines as `chstate.lines`.
-- Assigns an array of all lines as `chstate.lines`.
-- Adds warnings for redefined/shadowed locals and unused labels.
function stage.run(chstate)
local linstate = LinState(chstate)
Expand Down
2 changes: 1 addition & 1 deletion src/luacheck/stages/parse_inline_options.lua
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,7 @@ local function options_and_boundaries_comparator(t1, t2)
end
end

-- Applies bounadaries withing `inline_options_and_boundaries` to replace them with pop count
-- Applies boundaries within `inline_options_and_boundaries` to replace them with pop count
-- instructions in the resulting array.
-- Comments on lines with code are popped at the end of line.
-- Warns about unpaired push and pop directives.
Expand Down
2 changes: 1 addition & 1 deletion src/luacheck/vendor/sha1/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ local sha1 = {
SHA-1 secure hash and HMAC-SHA1 signature computation in Lua,
using bit and bit32 modules and Lua 5.3 operators when available
and falling back to a pure Lua implementation on Lua 5.1.
Based on code orignally by Jeffrey Friedl and modified by
Based on code originally by Jeffrey Friedl and modified by
Eike Decker and Enrique García Cota.]],
_LICENSE = [[
MIT LICENSE
Expand Down
Loading