Skip to content

Commit

Permalink
remove trailing blank spaces
Browse files Browse the repository at this point in the history
  • Loading branch information
Robert McLay committed Jan 10, 2025
1 parent 053afc2 commit bc8998d
Show file tree
Hide file tree
Showing 44 changed files with 188 additions and 194 deletions.
10 changes: 2 additions & 8 deletions Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -115,12 +115,6 @@ UNAME_S := $(shell uname -s)
VersionDate := $(shell cat $(VDateFn))
MODE := @MODE@

ifeq ($(UNAME_S),Darwin)
SED := gsed
else
SED := sed
endif

MODE_X := $(shell $(srcdir)/proj_mgmt/convert_mode.sh -x $(MODE))
MODE_R := $(shell $(srcdir)/proj_mgmt/convert_mode.sh -r $(MODE))

Expand Down Expand Up @@ -278,7 +272,7 @@ __installMe:
fn=$${bareN%%.in*}; \
ext=$${bareN#*.}; \
: echo "DIRLOC/fn: $(DIRLOC)/$$fn"; \
$(SED) -e 's|@PREFIX@|$(prefix)|g' \
sed -e 's|@PREFIX@|$(prefix)|g' \
-e 's|@LMOD_TOP_DIR@|$(MY_PACKAGE)|g' \
-e 's|@path_to_lua@|$(PATH_TO_LUA)|g' \
-e 's|@hashsum@|$(PATH_TO_HASHSUM)|g' \
Expand Down Expand Up @@ -444,7 +438,7 @@ config.status:
./config.status --recheck
trailing_blanks_removed:
find . -type d \( -path ./rt -o -path ./spec/Spider/h \) -prune -o -type f -name '*.lua' -exec $(SED) -i.bak.BAK -e 's/ *$$//' {} \;
find . -type d \( -path ./rt -o -path ./spec/Spider/h \) -prune -o -type f -name '*.lua' -exec sed -i.bak.BAK -e 's/ *$$//' {} \;
find . -type d \( -path ./rt -o -path ./spec/Spider/h \) -prune -o -name '*.lua.bak.BAK' -exec rm {} \;
dist:
Expand Down
2 changes: 1 addition & 1 deletion bugReport/my_modules/Core/gcc/10.0.lua
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ local MODULEPATH_ROOT = myFileName():match('(.*)/Core/gcc/.*')
prepend_path("MODULEPATH",pathJoin(MODULEPATH_ROOT,"Compiler/gcc/10"))



8 changes: 4 additions & 4 deletions messageDir/en.lua
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ return {
ml s -> ml save
ml sl -> ml savelist
ml sw -> ml swap
Loading Modules named "r" or "spider" or other module commands
--------------------------------------------------------------
Expand Down Expand Up @@ -177,7 +177,7 @@ please execute the command \" clearMT\" and reload your modules.
$ module swap %{oldFullName} %{newFullName}
Alternatively, you can set the environment variable LMOD_DISABLE_SAME_NAME_AUTOSWAP to "no" to re-enable same name autoswapping.
]==], --
]==], --
e_No_Hashsum = "Unable to find HashSum program (sha1sum, shasum, md5sum or md5).",
e_No_Matching_Mods = "No matching modules found.\n",
e_No_Mod_Entry = "%{routine}: Did not find module entry: \"%{name}\". This should not happen!\n",
Expand Down Expand Up @@ -215,7 +215,7 @@ See https://lmod.readthedocs.io/en/latest/260_sh_to_modulefile.html for details.
e_missing_table = "sandbox_registration: The argument passed is: \"%{kind}\". It should be a table.",
e_setStandardPaths = "Unknown Key: \"%{key}\" in setStandardPaths.\n",


--------------------------------------------------------------------------
-- LmodMessages
--------------------------------------------------------------------------
Expand Down Expand Up @@ -328,7 +328,7 @@ to see if the module(s) are available across all compilers and MPI implementatio
%{border}
The following dependent module(s) are not currently loaded: %{missing}
%{border}
]==],
]==],
w_MPATH_Coll = "The system MODULEPATH has changed: please rebuild your saved collection.\n",
w_Mods_Not_Loaded = "The following modules were not loaded: %{module_list}\n\n",
w_Nearly_Forbidden = "Access will be denied to this module starting %{after}\n",
Expand Down
30 changes: 15 additions & 15 deletions proj_mgmt/markedDefault.lua
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ local function l_marked_default(t, fullName, weight)

l_marked_default_helper(1,n,a,t,weight)
return t
end
end

local function l_find_all_sn(sn, t)
dbg.print{"\nl_find_all_sn(sn: \"",sn,"\", t)"}
Expand All @@ -47,9 +47,9 @@ local function l_find_all_sn(sn, t)
end

if (n < 1) then
print("not found")
print("not found")
return
end
end

local found = false
for i = 1, n do
Expand All @@ -61,11 +61,11 @@ local function l_find_all_sn(sn, t)
end

if (not found) then
print("not found")
print("not found")
return
end
dbg.print{"\n"}
dbg.printT("t",t)
dbg.printT("t",t)

local a = {}
for k, v in pairs(t) do
Expand All @@ -74,7 +74,7 @@ local function l_find_all_sn(sn, t)
dbg.print{"\n"}
dbg.printT("a",a)
end

function find_all_versions(k,t,a,b)
--dbg.start{"find_all_versions(k,t,a,b)"}
b[#b+1] = k
Expand All @@ -91,25 +91,25 @@ function find_all_versions(k,t,a,b)
end
--dbg.fini("find_all_versions")
end

function main()
local fullA = {{"compiler/intel/x86/24.1","s"},
{"compiler/intel/x86/22.1","s"},
{"compiler/intel/x86/blue/22.1","s"},
{"compiler/intel/x86/blue/24.1","s"},
{"compiler/intel/arm64/22.1","s"},
{"compiler/gcc/14.1", "s"},
{"gcc/12.1", "s"},
{"gcc/14.1", "s"},
{"gcc/14.1", "s"},
{"gcc/14.1", "u"},
{"gcc/13.1", "u"},
{"intel/24.1", "s"},
{"intel/22.1", "s"},
{"gcc/12.1", "s"},
{"gcc/14.1", "s"},
{"gcc/14.1", "s"},
{"gcc/14.1", "u"},
{"gcc/13.1", "u"},
{"intel/24.1", "s"},
{"intel/22.1", "s"},
}

dbg:activateDebug()

local t = s_fullNameDfltT

for i = 1,#fullA do
Expand Down
2 changes: 1 addition & 1 deletion settarg/BuildTarget.lua
Original file line number Diff line number Diff line change
Expand Up @@ -509,7 +509,7 @@ function M.exec(shell)
end

dbg.print{"3. envVarsTbl.TARG_OS: ",envVarsTbl.TARG_OS,"\n"}

stt:registerVars(envVarsTbl)
local old_stt = getSTT() or ""
local new_stt = stt:serializeTbl()
Expand Down
2 changes: 1 addition & 1 deletion shells/BaseShell.lua
Original file line number Diff line number Diff line change
Expand Up @@ -309,7 +309,7 @@ local function l_createShellTbl()
["lisp"] = {name = "lisp", object = Lisp },
["csh"] = {name = "csh", object = Csh },
["tcsh"] = {name = "tcsh", object = Csh },
["perl"] = {name = "perl", object = Perl },
["perl"] = {name = "perl", object = Perl },
["python"] = {name = "python", object = Python },
["json"] = {name = "json", object = Json },
["cmake"] = {name = "cmake", object = CMake },
Expand Down
2 changes: 1 addition & 1 deletion spec/MRC/MRC_spec.lua
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ describe("Testing MRC class #MRC.",
local _mrcMpathT = {}
sanizatizeTbl(rplmntA, mrcMpathT, _mrcMpathT)
--print(serializeTbl{indent=true, name="mrcT", value = mrcT})
--print(serializeTbl{indent=true, name="mrcMpathT", value = _mrcMpathT})
--print(serializeTbl{indent=true, name="mrcMpathT", value = _mrcMpathT})
assert.are.same(gold_mrcT, mrcT)
assert.are.same(gold_mrcMpathT, _mrcMpathT)
end)
Expand Down
4 changes: 2 additions & 2 deletions spec/ModuleA/ModuleA_spec.lua
Original file line number Diff line number Diff line change
Expand Up @@ -349,8 +349,8 @@ describe("Testing ModuleA Class #ModuleA.",
-- Secret way to wipe out the MT singleton
local projDir = os.getenv("PROJDIR")
local base = pathJoin(projDir, testDir)
local mpath = pathJoin(base, "mf2") .. ":" .. pathJoin(base, "mf3")
local mpath = pathJoin(base, "mf2") .. ":" .. pathJoin(base, "mf3")

posix.setenv("HOME",base, true)
posix.setenv("MODULEPATH",mpath,true)
local maxdepth = pathJoin(base, "mf2") .. ":2;" .. pathJoin(base, "mf3") .. ":2;"
Expand Down
8 changes: 4 additions & 4 deletions src/Cache.lua
Original file line number Diff line number Diff line change
Expand Up @@ -318,7 +318,7 @@ local function l_readCacheFile(self, mpathA, spiderTFnA)
end

dbg.print{"cacheFile found: ",fn,"\n"}
if (tracing == "yes") then
if (tracing == "yes") then
tracing_msg{"Using Cache file: ",fn}
end

Expand Down Expand Up @@ -396,10 +396,10 @@ local function l_writeUserSpiderCacheWhenNecessary(self, delta_t, mpathA, spider
dbg.print{"quiet: ", quiet(),", initial: ", optionTbl.initial,"\n"}
dbg.print{"prtRbMsg: ",prtRbMsg,", quiet: ",self.quiet,"\n"}


local r = {}
hook.apply("writeCache",r)

dbg.print{"self.dontWrite: ", self.dontWrite, ", r.dontWriteCache: ",
r.dontWriteCache, "\n"}

Expand Down Expand Up @@ -534,7 +534,7 @@ function M.build(self, fast)
mrc:update()
return false, false, false, false
end

if (next(spiderT) ~= nil) then
dbg.print{"Using pre-built spiderT!\n"}
dbg.fini("Cache:build")
Expand Down
14 changes: 7 additions & 7 deletions src/Configuration.lua
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ local function l_new(self)
local lmod_configDir = cosmic:value("LMOD_CONFIG_DIR")
local lmod_lang = cosmic:value("LMOD_LANG")
local lmodrc = cosmic:value("LMOD_RC")
local lmod_branch = cosmic:value("LMOD_BRANCH")
local lmod_branch = cosmic:value("LMOD_BRANCH")
local lua_path = cosmic:value("PATH_TO_LUA")
local mpath_avail = cosmic:value("LMOD_MPATH_AVAIL")
local mpath_init = cosmic:value("LMOD_MODULEPATH_INIT")
Expand Down Expand Up @@ -188,7 +188,7 @@ local function l_new(self)
end
s = s .. "}"
local fileIgnPattStr = s:gsub(", }","}")

if (dfltModules == "") then
dfltModules = "<empty>"
end
Expand Down Expand Up @@ -220,10 +220,10 @@ local function l_new(self)
tbl.allowRoot = { k = "Allow root to use Lmod" , v = allow_root_use, n = "LMOD_ALLOW_ROOT_USE" }
tbl.allowTCL = { k = "Allow TCL modulefiles" , v = allow_tcl_mfiles, n = "LMOD_ALLOW_TCL_FILES" }
tbl.avail_style = { k = "Avail Style" , v = avail_style, n = "LMOD_AVAIL_STYLE" }
tbl.autoSwap = { k = "Auto swapping" , v = auto_swap, n = "LMOD_AUTO_SWAP" }
tbl.autoSwap = { k = "Auto swapping" , v = auto_swap, n = "LMOD_AUTO_SWAP" }
tbl.case = { k = "Case Independent Sorting" , v = case_ind_sorting, n = "LMOD_CASE_INDEPENDENT_SORTING" }
tbl.colorize = { k = "Colorize Lmod" , v = lmod_colorize, n = "LMOD_COLORIZE" }
tbl.configDir = { k = "Configuration dir" , v = lmod_configDir, n = "LMOD_CONFIG_DIR" }
tbl.configDir = { k = "Configuration dir" , v = lmod_configDir, n = "LMOD_CONFIG_DIR" }
tbl.disable1N = { k = "Disable Same Name AutoSwap" , v = disable1N, n = "LMOD_DISABLE_SAME_NAME_AUTOSWAP" }
tbl.disp_av_ext = { k = "Display Extension w/ avail" , v = avail_extensions, n = "LMOD_AVAIL_EXTENSIONS" }
tbl.dotConfOnly = { k = "Use ~/.config dir only" , v = useDotConfigOnly, n = "LMOD_USE_DOT_CONFIG_ONLY" }
Expand Down Expand Up @@ -329,7 +329,7 @@ function M.report(self, t)
end

local b = {}
local bt
local bt
if (not mini) then
bt = BeautifulTbl:new{tbl=a}
b[#b+1] = bt:build_tbl()
Expand All @@ -351,7 +351,7 @@ function M.report(self, t)
b[#b+1] = "Changes from Default Configuration"
b[#b+1] = "----------------------------------\n"


if (next(aa) ~= nil) then
bt = BeautifulTbl:new{tbl=aa}
b[#b+1] = bt:build_tbl()
Expand Down Expand Up @@ -388,7 +388,7 @@ function M.report(self, t)
b[#b+1] = bt:build_tbl()
b[#b+1] = "\n"
end

local banner = Banner:singleton()
local border = banner:border(2)
local str = " Lmod Property Table (LMOD_RC):"
Expand Down
10 changes: 5 additions & 5 deletions src/DirTree.lua
Original file line number Diff line number Diff line change
Expand Up @@ -145,25 +145,25 @@ end

--------------------------------------------------------------------------
-- This routine is given the absolute path to all possible default
-- files.
-- files.
-- @param defaultA - An array entries that contain: { fullName=, fn=, mpath=, luaExt=, barefn=}
-- return the first defaultA. All other ones are ignored.
local function l_versionFile(mrc, mpath, defaultA)
--dbg.start{"DirTree:l_versionFile(mrc, mpath, defaultA)"}
sort(defaultA, function(x,y)
return x.defaultIdx < y.defaultIdx
end)
repeat
repeat
local defaultT = defaultA[1]
local path = defaultT.fn
if (defaultT.barefn == "default") then
defaultT.value = barefilename(l_walk_link(defaultT.fn)):gsub("%.lua$","")
break
end

local modA = mrc_load(path)
local _, _, name = defaultT.fullName:find("(.*)/.*")

defaultT.value = mrc:parseModA_for_moduleA(name, mpath, modA)
until true
--dbg.fini("DirTree:l_versionFile")
Expand Down Expand Up @@ -251,7 +251,7 @@ end

local function l_walk_tree(mrc, mpath, pathIn, dirT, regularFn)

local defaultA
local defaultA
local dirA = {}
local fileT = {}
defaultA, regularFn = l_walk(mrc, mpath, pathIn, dirA, fileT, regularFn)
Expand Down
4 changes: 2 additions & 2 deletions src/Hook.lua
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ local validT =
spider_decoration = {}, -- This hook adds decoration to spider level one output.
-- It can be the category or a property.
reverseMapPathFilter = {}, -- This hook returns two arrays keepA, ignoreA to keep or
-- ignore a path in the reverseMap mapping
-- ignore a path in the reverseMap mapping
colorize_fullName = {}, -- Allow module avail and list to colorize name and/or version
}

Expand Down Expand Up @@ -106,7 +106,7 @@ function M.register(name, func, action)
if (not s_actionT[action]) then
LmodWarning{msg="w_Unknown_Hook_Action",action = tostring(action)}
end

-- Save func depending on action
if (action == "replace") then
validT[name] = {func}
Expand Down
4 changes: 2 additions & 2 deletions src/Hub.lua
Original file line number Diff line number Diff line change
Expand Up @@ -993,7 +993,7 @@ function M.overview(self,argA)
return a
end



local use_cache = false
local moduleA = ModuleA:singleton{spider_cache=use_cache}
Expand Down Expand Up @@ -1290,7 +1290,7 @@ function M.avail(self, argA)
if (optionTbl.terse or optionTbl.terseShowExtensions) then
--------------------------------------------------
-- Terse output
self:terse_avail(mpathA, availA, searchA, showSN, defaultOnly,
self:terse_avail(mpathA, availA, searchA, showSN, defaultOnly,
defaultT, optionTbl.terseShowExtensions, a)

dbg.fini("Hub:avail")
Expand Down
2 changes: 1 addition & 1 deletion src/MC_Show.lua
Original file line number Diff line number Diff line change
Expand Up @@ -361,7 +361,7 @@ function M.set_shell_function(self, name, bashStr, cshStr)
name = name or "<unknown>"
bashStr = bashStr or ""
cshStr = cshStr or ""

a[#a+1] = "set_shell_function("
a[#a+1] = '"'..name..'",'
a[#a+1] = bashStr:doubleQuoteString()..','
Expand Down
2 changes: 1 addition & 1 deletion src/MC_Spider.lua
Original file line number Diff line number Diff line change
Expand Up @@ -264,7 +264,7 @@ function M.pushenv(self, name, value)
save_set_env(name, value)
dbg.fini()
return true
end
end

--------------------------------------------------------------------------
-- Pass-thru to Spider_append_path().
Expand Down
2 changes: 1 addition & 1 deletion src/MN_Match.lua
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ M.my_name = "match"


local s_stepA = {
MName.find_exact_match, -- exact match with required version
MName.find_exact_match, -- exact match with required version
MName.find_highest, -- Highest match
MName.find_exact_match_meta_module, -- match meta module
}
Expand Down
Loading

0 comments on commit bc8998d

Please sign in to comment.