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 support of @import directives in sass #378

Merged
merged 3 commits into from
Feb 7, 2020
Merged

Added support of @import directives in sass #378

merged 3 commits into from
Feb 7, 2020

Conversation

asvishnyakov
Copy link
Contributor

@asvishnyakov asvishnyakov commented Feb 6, 2020

About workaround with directories. SASS/SCSS allow to make import like this:

@import 'mixins';

If you have both mixins folder and mixins.scss, compiler will throw an exception because it can't determine which one use.

@vc-ci
Copy link
Contributor

vc-ci commented Feb 6, 2020

SonarQube analysis reported 7 issues

Note: The following issues were found on lines that were not modified in the pull request. Because these issues can't be reported as line comments, they are summarized here:

  1. CRITICAL ShopifyLiquidThemeEngine.cs#L347: Refactor this method to reduce its Cognitive Complexity from 20 to the 15 allowed. rule
  2. MAJOR ShopifyLiquidThemeEngine.cs#L148: Remove this commented out code. rule
  3. MAJOR ShopifyLiquidThemeEngine.cs#L259: Split this method into two, one handling parameters check and the other handling the asynchronous code. rule
  4. MINOR ShopifyLiquidThemeEngine.cs#L364: Replace this type-check-and-cast sequence with an 'as' and a null check. rule
  5. MINOR ShopifyLiquidThemeEngine.cs#L379: Replace this type-check-and-cast sequence with an 'as' and a null check. rule
  6. MINOR ShopifyLiquidThemeEngine.cs#L422: Remove this hardcoded path-delimiter. rule
  7. INFO ShopifyLiquidThemeEngine.cs#L305: Complete the task associated to this 'TODO' comment. rule


public string ToAbsolutePath(string path)
{
throw new NotImplementedException();
Copy link
Contributor

Choose a reason for hiding this comment

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

If it a part of interface implementation then it must be implemented anyway. Otherwise, this is a violation of SOLID principles

Copy link
Contributor

Choose a reason for hiding this comment

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

It is 3rd party interface and we can't change it.

throw new NotImplementedException();
}

public string ReadFile(string path)
Copy link
Contributor

Choose a reason for hiding this comment

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

If you read the file why you return the string?
Maybe ReadFileAsString should be better named in this context

{
return false;
}
return _contentBlobProvider.PathExists(path);
Copy link
Contributor

Choose a reason for hiding this comment

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

cosmetic note: we have a stylecop rule which required add empty space after closed brackets.
see: https://github.com/DotNetAnalyzers/StyleCopAnalyzers/blob/master/documentation/SA1513.md
https://github.com/DotNetAnalyzers/StyleCopAnalyzers/blob/master/documentation/SA1508.md

we going to use stylecop in all backend projects so it can be simply corrected now


namespace VirtoCommerce.LiquidThemeEngine
{
public interface ISassFileManager: IFileManager
Copy link
Contributor

Choose a reason for hiding this comment

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

It would be great to add some comments to this abstraction with a description of the purpose.


public string ToAbsolutePath(string path)
{
throw new NotImplementedException();
Copy link
Contributor

Choose a reason for hiding this comment

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

It is 3rd party interface and we can't change it.

@tatarincev tatarincev merged commit 87767d9 into dev Feb 7, 2020
@tatarincev tatarincev deleted the fix/sass branch February 7, 2020 07:43
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