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

Code: Rescue tests from failing #380

Merged
merged 2 commits into from
Dec 31, 2013
Merged

Conversation

am11
Copy link
Contributor

@am11 am11 commented Dec 31, 2013

  • Code refactoring.
  • Extracted common pattern to ProjectHelpers.
  • Analysis warning fixes.
  • Code Formatting.

  • LESS: Fixes SourceMap path in CSS.

@SLaks
Copy link
Collaborator

SLaks commented Dec 31, 2013

I already fixed this

@am11
Copy link
Contributor Author

am11 commented Dec 31, 2013

@SLaks, now it will log the exception message. AFAICR, it was throwing NullReferenceException.

@SLaks
Copy link
Collaborator

SLaks commented Dec 31, 2013

When / why?

@madskristensen
Copy link
Owner

@am11 These fixes for the LESS source maps are different from the ones @SLaks committed earlier. Should this still be merged as is?

@am11
Copy link
Contributor Author

am11 commented Dec 31, 2013

@SLaks, This

* Code refactoring.
* Extracted common pattern to ProjectHelpers.
* Analysis warning fixes.
* Code Formatting.
@am11
Copy link
Contributor Author

am11 commented Dec 31, 2013

@madskristensen, I pulled and rebased the changes. Now its ready for merging. :)

madskristensen added a commit that referenced this pull request Dec 31, 2013
Code: Rescue tests from failing
@madskristensen madskristensen merged commit 12062ae into madskristensen:master Dec 31, 2013
@am11
Copy link
Contributor Author

am11 commented Dec 31, 2013

@madskristensen, @SLaks,

I have a question regarding C# syntax.

Is there a way to add parameter Alias to function via decorator / attribute? Like for PowerShell, we have [Alias()].

Case in point is JsHintCompiler. If we make it node driven, then the second parameter of NodeExecutorBase.Compile(string, string); namely targetFileName would act like configurationFileName (c:\path\to\WEsettingsDirectory.jshintrc): Ditto signature but the parameter is multipurpose (as we immediately pass it to GetArguments method; an abstract method which is overridden by derived classes and this is where we have the context to resolve the purpose / meanings of parameters.

Rarely we get into such situations. I was hoping if language supports it? Instead we can use a method overload and a third parameter. But logically, it would always be parameter2 XOR parameter3.

Not very ideal, but is aliasing parameters a legit design from the OO patterns POV? I guess this will not violate any Language Design or Code Analysis rule either.

If its not supported, I am planning to make a feature request with .NET team. Is it a good idea?

@SLaks
Copy link
Collaborator

SLaks commented Dec 31, 2013

No such feature exists.

You could create a public new CompilerResult Compile(string, string) with different parameter names that calls the base version, and misuses the base parameter.

@am11
Copy link
Contributor Author

am11 commented Jan 2, 2014

@SLaks, thanks for your input. I have submitted this request on Connect. https://connect.microsoft.com/VisualStudio/feedback/details/812838/parameter-name-aliases-in-c

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.

3 participants