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

Added gears.string.psplit function to support patterns #3839

Merged
merged 8 commits into from
Nov 19, 2023

Conversation

Piterden
Copy link
Contributor

It will support strings with more than one char length and regex patterns. Also there's no need for additional checks for start and end of a string anymore.

@actionless
Copy link
Member

you need to add new unit tests for newly-added functionality

@actionless
Copy link
Member

(in spec/gears/string_spec.lua)

spec/gears/string_spec.lua Outdated Show resolved Hide resolved
@codecov
Copy link

codecov bot commented Aug 14, 2023

Codecov Report

Merging #3839 (9775b5e) into master (7ed4dd6) will decrease coverage by 0.02%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##           master    #3839      +/-   ##
==========================================
- Coverage   91.03%   91.01%   -0.02%     
==========================================
  Files         901      901              
  Lines       57540    57566      +26     
==========================================
+ Hits        52380    52396      +16     
- Misses       5160     5170      +10     
Flag Coverage Δ
gcov 91.01% <100.00%> (-0.02%) ⬇️
luacov 93.73% <100.00%> (-0.01%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files Coverage Δ
lib/gears/string.lua 98.30% <100.00%> (+0.52%) ⬆️
spec/gears/string_spec.lua 100.00% <100.00%> (ø)

... and 3 files with indirect coverage changes

@Piterden
Copy link
Contributor Author

@actionless there are two workflows haven't been passed. Should I do something with them to fix?
image

@Aire-One
Copy link
Member

Aire-One commented Aug 14, 2023

@actionless there are two workflows haven't been passed. Should I do something with them to fix? image

The luajit error was from a flaky test. I restarted the CI and it's green now.

The fixed-lgi-lua5.2 is a luacheck warning:

Checking lib/awful/permissions/init.lua           1 warning

    lib/awful/permissions/init.lua:371:30: Error prone negation: negation is executed before relational operator.

That's a new check for this warning that they added recently, lunarmodules/luacheck#94.

It needs to be taken care of first.

actionless added a commit to actionless/awesome that referenced this pull request Aug 15, 2023
@Piterden Piterden changed the title Updated gears.split function to support patterns Added gears.string.psplit function to support patterns Aug 16, 2023
awesome-robot added a commit to awesomeWM/apidoc that referenced this pull request Aug 17, 2023
awesome-robot added a commit to awesomeWM/apidoc that referenced this pull request Aug 17, 2023
awesome-robot added a commit to awesomeWM/apidoc that referenced this pull request Aug 17, 2023
@Aire-One
Copy link
Member

@Piterden, with #3840 now merged, can you please rebase/merge master into your branch?

@Piterden
Copy link
Contributor Author

@Aire-One excuse me for a long delay. Done!

@Piterden
Copy link
Contributor Author

What should I do to fix checks passing?

@Elv13 Elv13 merged commit dfe6a47 into awesomeWM:master Nov 19, 2023
10 of 11 checks passed
@Elv13
Copy link
Member

Elv13 commented Nov 19, 2023

I squashed the commits, this should solve the problem which was preventing this from auto-merging:

Error -> lib/gears/filesystem.lua @ 12
suite spec/awful/completion_spec.lua
lib/gears/filesystem.lua:12: error loading module 'gears.string' from file 'lib/gears/string.lua':
	lib/gears/string.lua:101: unexpected symbol near 'for'

stack traceback:
	lib/gears/filesystem.lua:12: in main chunk


Error -> spec/awful/prompt_spec.lua @ 63
main
lib/gears/filesystem.lua:12: error loading module 'gears.string' from file 'lib/gears/string.lua':
	lib/gears/string.lua:101: unexpected symbol near 'for'

duxedo pushed a commit to duxedo/awesome that referenced this pull request Mar 24, 2024
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

Successfully merging this pull request may close these issues.

4 participants