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

Add file type option which ignores file extensions other than provided #84

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

mnojek
Copy link

@mnojek mnojek commented Jul 1, 2020

Currently RFlint operates on .robot, .resource, .txt and .tsv file extensions but in RF 3.2 all extensions different than .robot and .resource. are not automatically supported (you need to provide them explicitly). There is also a file type .rst that RF supports but RFLint does not read it. By adding new command line option the user is able to select which file types will be processed and RFlint will ignore the others. The default supported files are .robot and .resource but you can also provide .txt, .tsv and .rst extensions.

The option is called by --filetypes or -t with extensions separated by comma, e.g. rflint -t robot,resource,txt

I added also test cases to cover this new feature.


.resource And .tsv Supported File Types
[Template] Run Rflint And Verify There Are No Errors For Supported File Types
resource tsv
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Misaligned

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I did it on purpose, please look at the whole file. But I can revert it if it looks strange. What do you think?

Copy link

@bhirsz bhirsz Jul 2, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh I see, thanks to this format it's easy to see that you're testing this or that file format combination. But maybe you could use this approach?

*** Test Cases ***    
Test Supported File Types    
[Template]      Run Rflint And Verify There Are No Errors For Supported File Types    
robot  resource  tsv    
robot  resource    
       resource    tsv    
robot              tsv    
robot    
      resource    
    

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, another approach is to use arguments embedded in keyword name. I will think which one is the best for this use.

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.

2 participants