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 Save in diktat smoke tests #1060

Merged
merged 6 commits into from
Sep 29, 2021
Merged

Conversation

Cheshiriks
Copy link
Member

What's done:

  • added Save in diktat smoke tests

### What's done:
* added Save in diktat smoke tests
Closes #1047
@codecov
Copy link

codecov bot commented Sep 24, 2021

Codecov Report

Merging #1060 (8795cc1) into master (735339a) will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff            @@
##             master    #1060   +/-   ##
=========================================
  Coverage     83.43%   83.43%           
  Complexity     2447     2447           
=========================================
  Files           102      102           
  Lines          6120     6120           
  Branches       1832     1832           
=========================================
  Hits           5106     5106           
  Misses          272      272           
  Partials        742      742           
Flag Coverage Δ
unittests 83.43% <ø> (ø)

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


Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 735339a...8795cc1. Read the comment docs.

@@ -0,0 +1,10 @@
[general]
execCmd="./ktlint -R diktat-1.0.0-rc.2.jar"
Copy link
Member

Choose a reason for hiding this comment

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

I thought we were planning to execute SAVE in CI too?

### What's done:
* added Save in diktat smoke tests
Closes #1047
description = "SmokeTest"
suiteName = "SmokeTest"

[fix]
Copy link
Member

Choose a reason for hiding this comment

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

Shouldn't it be fix-and-warn? We have some unfixed warnings in smoke tests

Copy link
Member Author

Choose a reason for hiding this comment

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

Fixed

fun compareFilesFromResources(
expectedResult: String,
testFileStr: String,
smoke: Boolean = false): Boolean {
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
smoke: Boolean = false): Boolean {
trimLastEmptyLine: Boolean = false): Boolean {

To make it look like a more general option

Copy link
Member Author

Choose a reason for hiding this comment

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

Fixed

### What's done:
* added Save in diktat smoke tests
Closes #1047
Comment on lines 54 to 55
val expectWithoutWarn = expect.filter { line ->
!line.contains(regex)
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
val expectWithoutWarn = expect.filter { line ->
!line.contains(regex)
val expectWithoutWarn = expect.filterNot { line ->
line.contains(regex)

Copy link
Member Author

Choose a reason for hiding this comment

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

Fixed

### What's done:
* added Save in diktat smoke tests
Closes #1047
@Cheshiriks Cheshiriks merged commit 18471a0 into master Sep 29, 2021
@kgevorkyan kgevorkyan deleted the feature/run_tests_using_save branch March 28, 2023 11:17
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