This is a migrated thread and some comments may be shown as answers.

JustCode is ignoreing the "MasterType" directive in the .ASPX files

6 Answers 112 Views
Code Analysis
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Jerremy
Top achievements
Rank 1
Jerremy asked on 25 Nov 2009, 10:26 AM
As the subject says, JustCode Beta #1 seems to be ignoring the "<%@ MasterType VirtualPath="~/MasterPages/Master.master" %>" directives.

Currently it says the project I'm working on has 218 errors in 72 files. A large sum of these errors are "C#: Unknown method 'foo()' of 'System.Web.UI.MasterPage' .

While on the subject of error reporting, can the path be included in the error listing? We have a few files with the same name in several directories (for example Default.aspx). It's hard to see which file its complaining about when there's several with the same name. This preferably would have to be the path relative to the project. So something like /folder/folder/default.aspx instead of d:\projects\foo\bar\folder\folder\default.aspx .

Also could the warnings perhaps not include 'sender' parameter is not used in this method, if the method in question is an event handler? Almost all of the 615 warnings in this project are about 'sender' or 'e'.

6 Answers, 1 is accepted

Sort by
0
Deyan Varchev
Telerik team
answered on 25 Nov 2009, 12:19 PM
Hi Jerremy,

Thanks for giving us your feedback. Straight to the questions at hand. The MasterType issue that you report was also reported by others. We are aware of it and a fix is already on its way. At the end of this week a new build will be available where this issue will be fixed.

As for your second question - in the error list we show only the file name currently. If you hover over some file name as a tooltip you will see the full file path to that file. Double-clicking on some error/warning will navigate to that error/warning. However, your suggestion sounds reasonable and we will include it to our product backlog for future implementation.

Your third request is also something that we have already spotted. Those warnings shouldn't be reported by JustCode. We have it scheduled for fixing in one of the following releases.

In case there are errors/warnings that you consider incorrectly reported you can ignore those either by using the context menu in the Error List or using the Quick fix context menu (Alt + Enter) when the cursor is over the particular error/warning.

In case you have some more questions or problems, don't hesitate to wright back.


Sincerely yours,
Deyan
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
0
David Brown
Top achievements
Rank 2
answered on 18 Oct 2010, 06:30 PM
Hi -- 

The issue I am experiencing appears to have been identified and corrected in a previous release of JustCode.  I am experiencing a lot of false positives - 132 errors in 70 files.  All are: ASP.Net tags: File does not belong to a project.  The file referenced is a Master file.  VS 2010 lists no errors.  Specifically,

<%@ page language="vb" autoeventwireup="false" masterpagefile="~/Templates/MasterPage.Master" codebehind="WebPage.aspx.vb" inherits="WebPage" %>
<%@ mastertype virtualpath="~/Templates/MasterPage.Master" %>

In both lines, JustCode (2010.3.1004.1) identifies "~/Templates/MasterPage.Master" as a file not belonging to the project.

Thanks,
David
0
Hans Kratz
Telerik team
answered on 06 Nov 2010, 06:19 PM
Hello David,

sorry for the late response.

Do the errors disappear if you choose the JustCode | Refresh Code Analysis menu item? If they do, this issue will be fixed in the next JustCode release. If not we have to investigate further. Can you please check?

Best wishes,
Hans Kratz
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
ATS
Top achievements
Rank 1
answered on 22 Feb 2011, 08:38 PM
Throwing my hat in the ring on this one - JustCode complains every time I reference a public property I've set in my master page. Initially, it was just a public variable, so I thought that might be it. So I made it a proper property with a get/set and private variables behind it. That didn't help either. Then I thought maybe it was not reading the MasterType directive, but that isn't it either - even explicitly casting Master to the correct type does not help. There is seemingly no way to get JustCode to allow Master.[PropertyName] without it calling that an error with the "There is no member 'PropertyName' for MasterPage_Master".

Is this a new bug, or did the fix for it somehow get lost? I'd really like to get rid of all of these false positives, because they are the vast majority of the "errors" JustCode reports.

Thanks!
0
ATS
Top achievements
Rank 1
answered on 20 May 2011, 05:24 PM
This is still a problem, and it's resulting in thousands of false errors in my project, render JustCode nearly unusable. Please, can we get a solution?

Thanks!
0
Hans Kratz
Telerik team
answered on 09 Jun 2011, 12:32 PM
Hello JT,

sorry for the late response. I tried to reproduce the problem in both a web application project and a website but failed to do so. The solution I tried it with is attached. Could you please check if you get errors with the attached solution and if not try to find out what is different in your solution?

Alternatively you can of course raise a private ticket including a solution which shows the problematic behavior.


All the best,
Hans Kratz
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Tags
Code Analysis
Asked by
Jerremy
Top achievements
Rank 1
Answers by
Deyan Varchev
Telerik team
David Brown
Top achievements
Rank 2
Hans Kratz
Telerik team
ATS
Top achievements
Rank 1
Share this question
or