« first day (199 days earlier)      last day (2981 days later) » 
00:00 - 15:0015:00 - 23:00

12:50 AM
> Displays Inspection Config info; not very user friendly yet
 
1:13 AM
> [CodeInspectionSetting][1] and [TodoMarker][2] use `ints` instead of their proper Enum types. This is due to a misunderstanding I had about XML Serialization. Update them to their proper types and remove (what will be) unnecessary casts to the proper types.

[1]:https://github.com/retailcoder/Rubberduck/blob/settingsUI/RetailCoder.VBE/Config/CodeInspectionSettings.cs#L37-L40
[2]:https://github.com/retailcoder/Rubberduck/blob/settingsUI/RetailCoder.VBE/Config/ToDoMarkers.cs#L18
> Strong typed enums for serialization
 
1:37 AM
> Closing this issue, code inspections detect multiline instructions and ignores them. Labelling "won't fix" for now; this issue will be addressed when code inspections can handle multiline instructions.
 
Hiya.
 
hey
 
Is @Duga in C# too?
Also, when does he respond to pings?
 
it's a Java bot running on @SimonAndréForsberg's machine, he responds to pings when Simon logs in as Duga :)
 
OK, I thought it said it was in C#.
Back in the 2nd M.
Is @RubberDuck here?
 
1:47 AM
Yup.
 
I always have the two chatrooms opened in a tab somewhere - if not at home, at work, if not there, on my cell phone
 
Why is the AccessApp class commented out?
@RubberDuck?
 
I don't know. Mug?
 
my bad - I ran into issues getting it to work with the PIA's
 
OK.
So it is clear to uncomment it?
 
1:49 AM
@Mat'sMug Ahhhhh that's right.
What kind of trouble were you having anyway?
 
It is telling me The Namespace Access could not be found.
 
^^ that
it wouldn't build
 
OK, let me see.
 
I didn't try really hard though
 
Did you add the reference to the *.dll?
 
1:51 AM
yeah, but VS is complaining about it
Microsoft.Office.Interop.Access
 
Huh..... That's problematic.
 
This is the only error I'm getting at the moment, with that line uncommented:
(606):1>C:\Program Files (x86)\MSBuild\12.0\bin\Microsoft.Common.CurrentVersion.targets(4169,5): error MSB3216: Cannot register assembly "C:\Users\Abraham\Desktop\Rubberduck\RetailCoder.VBE\bin\Debug\Rubberduck.dll" - access denied. Please make sure you're running the application as administrator. Access to the registry key 'HKEY_CLASSES_ROOT\Rubberduck.UI.AboutWindow' is denied.
 
are you running VS as admin?
 
I'm in an admin account.
 
VS needs access to your registry to properly register for COM
 
1:56 AM
Yeah, just started it as admin.
 
should work
 
If there is any malicious code in there, I'll kick you off the web.
 
lol
I'm running it on my work laptop!
 
> CodeInspectionControl is fully functioning, but not sexy
2
 
You might be controlling a bot.
 
1:57 AM
> config saves on option dialog close
 
Anyway, how do I run it now?
 
> Closes #121
 
It says it can't be started directly.
 
in the project properties, in the debug tab, I've set it up to launch Excel
so when I F5-debug, Excel starts and VS attaches to the process automatically
 
Here's a screen shot of my debug set up
 
1:59 AM
I see. I found that, but how would I attach Access?
 
I've got the file menu open.
 
^^^ that
 
OK, I get it.
 
No idea what this is, but it deserved another star.
2 days ago, by Phrancis
AH!!!!
 
2:00 AM
it was in response to Simon saying "boo!"
 
Hahaha. Nice.
 
> Easier than expected, but this change does break any existing Rubberduck.config files. Need to make a note of it next release.
> For example, this signature:

Public Function Format(format_string As String, ParamArray values()) As String

will cause an inspection result saying "Parameter is passed ByRef implicitly" for the `format_string` parameter, but double-clicking on the inspection result causes a `NullReferenceException`.
 
OK, so what should happen after Excel opens?
 
Should the ALT-f11 window open too?
 
@Hosch250 you need to do that :)
 
OK, wasn't sure.
 
@Duga documentation FTW
is there a way to force a commit to be linked to a work item, like in TFS?
 
This is what I have in Access so far.
Database1 isn't clickable.
 
@Mat'sMug Closes, Fixes, Fixed, Closed are all supposed to auto close issues.
 
2:07 AM
Oh hold on.
 
Hmm, that didn't solve it.
 
> If the commit is in a non-default branch, the issue will remain open and the issue will be referenced with a tooltip.
 
Does anyone know why that is happening?
 
What's happening @Hosch250?
 
2:09 AM
I think you need to add a code module - you have an empty project basically
 
@RubberDuck Absolutely nothing!
 
There's probably just not any cod..... that ^
 
That is the hardest bug to fix.
 
The add in is loaded there's just no code in the project. You could open anything in the Rubberduck menu.
 
OK.
 
2:10 AM
Rubberduck>>Test Explorer>>Add Test Module
 
well Rubberduck can create a code module for you, from the test explorer ^^ that
 
> Merge branch 'master' of github.com/retailcoder/Rubberduck into settingsUI
 
Pulled from master @Duga. There ya go. =;)-
 
Here we go.
 
I should probably stop pinging Simon..... lol
 
2:12 AM
@SimonAndréForsberg @SimonAndréForsberg @SimonAndréForsberg @SimonAndréForsberg mwahahaha
 
Umm, is any of you having a problem with the application attempting to recover information when closed?
That is bad.
 
@Hosch250 what do you mean?
 
Post a screenshot.
 
smoke time, back in a few minutes
 
It isn't pulling up a screenshot.
It stops when I hit prt sc
Now, what extra does it do from these methods I'm working on?
It doesn't seem to do anything different to me.
It is working in PowerPoint and everything, for what I know.
Except the applications keep crashing when I try to close them.
 
2:22 AM
You would have to actually run some unit tests to see if it's working in those apps.
 
OK.
 
The windows are doing what it seems they should.
 
Great!
Go away @ticker.....
No SO today.
 
Anyway, do I need to add an assembly reference to get using Word = Microsoft.Office.Interop.PowerPoint; to work?
 
2:23 AM
Yes, but shouldn't that be
PowerPoint = Microsoft.Office.Interop.PowerPoint
?
 
This is what came in it:
using Excel = Microsoft.Office.Interop.Excel;
using Access = Microsoft.Office.Interop.Access;
using Word = Microsoft.Office.Interop.Word;
using PowerPoint = Microsoft.Office.Interop.PowerPoint;
I did the PowerPoint one.
 
Okay... was just reading what you put in chat. =;)-
 
I'm not sure why the PowerPoint one doesn't work.
 
the "fun" part, is that unhandled exceptions are completely swallowed somewhere between .NET and COM - that's why I put these System.Diagnostics.Debug.Assert(false) in strategic locations (well, for what I'm working on anywah)
otherwise if you don't have a breakpoint in a catch block, you'll never see an exception, it just fails silently. yay COM interop!
 
OK, got the reference in.
Working now.
 
2:29 AM
nice!
 
The last application it is open in crashes when closed.
So if I have Word and PowerPoint open, the first closed won't crash, but the second will.
 
that's a new one
 
I'm using 2013.
 
hmm
how does it crash?
 
Trying to restore data.
Reboot application.
This is funny: base._application.Run(target); doesn't work in PowerPointApp : ....
It is exactly the same as the other apps:
[ComVisible(false)]
    public class WordApp : HostApplicationBase<Word.Application>
    {
        public WordApp() : base("Word") { }

        public override void Run(string target)
        {
            base._application.Run(target);
        }

        protected override string GenerateFullyQualifiedName(string projectName, string moduleName, string methodName)
        {
            return string.Concat(moduleName, ".", methodName);
        }
    }

    [ComVisible(false)]
    public class PowerPointApp : HostApplicationBase<PowerPoint.Application>
error CS1501: No overload for method 'Run' takes 1 arguments
 
2:37 AM
It seems each app has its own implementation... I haven't used VBA much outside of Excel, but I figure it would be nice to have our duck work in all Office apps
 
Yeah.
I gave the error message, and it doesn't really make sense.
 
What's not working @Hosch250?
 
Anyway, I need to go now, sorry.
@RubberDuck error CS1501: No overload for method 'Run' takes 1 arguments
In PowerPoint...
Should I submit what I have so far?
So you guys have it, or no?
 
what do you have?
 
The uncommented Access and what should work in PowerPoint.
 
2:39 AM
sure
 
403 error.
Wouldn't submit.
Oh, hold on.
 
@RubberDuck why do we have a reference to Microsoft ActiveX Data Objects 2.5 Library?
 
It got added automatically when I added the Access reference @Mat'sMug...
@Hosch250 there's no hurry. Submit the pull request when you're good and ready.
 
^^
 
OK, I thought you guys might want my code, but if there's no hurry...
 
2:42 AM
Hell.... I've had this branch checked out for a month now..
Nah. No hurry.
Thanks for the help though! Greatly appreciated.
 
I got the Interop assemblies correctly referenced now, I uncommented the Access stuff and it works
 
Cool.
 
> The selection in the active code pane should be cleared after applying a quick fix; currently the selection highlight gets messed up. So either deselect the code (place cursor after [before?] the modified code), or ...just find the next code issue and select it.
> Cleaned up CodeInspectionControl display
> changed CodeInspectionControl constructor
> VBA arrays must be passed by reference; a quick fix that would pass it `ByVal` would break user's code.

Disable the "Pass parameter by value" menu item when the parameter is an array.
 
3:06 AM
and crap
CodeInspectionResultBase takes an Instruction - it needs to take the whole SyntaxTreeNode for that to work
 
3:25 AM
> added office interop references
> closes #123
> refactored SettingsDialog
> CodeInspectionResultBase needs to be modified to take the whole SyntaxTreeNode instead of just its Instruction for this to work.
> We need a way to provide a default configuration in the case that the *.config file is missing or corrupt. This is how I handled it, but I don't like it much.

public static ToDoMarker[] GetDefaultTodoMarkers()
{
var note = new ToDoMarker("NOTE:", TodoPriority.Low);
var todo = new ToDoMarker("TODO:", TodoPriority.Normal);
var bug = new ToDoMarker("BUG:", TodoPriority.High);

return new ToDoMarker[] { note, todo, bug };
...
}

public static CodeInspection[] GetDefaultCodeInspections()
{
// note: any additional inspection settings added in the future need to be added here
var optionExplicit = new Config.CodeInspection(InspectionNames.OptionExplicit, Inspections.CodeInspectionType.CodeQualityIssues, Inspections.CodeInspectionSeverity.Warning);
var implicitVariantReturn = new Config.CodeInspection(InspectionNames.ImplicitVariantReturnType, Inspectio...
ns.CodeInspectionType.CodeQualityIssues, Inspections.CodeInspectionSeverity.Suggestion);
var implicitByRef = new Config.CodeInspection(InspectionNames.ImplicitByRef, Inspections.CodeInspectionType.CodeQualityIssues, Inspections.CodeInspectionSeverity.Warning);
var obsoleteComment = new Config.CodeInspection(InspectionNames.ObsoleteComment, Inspections.CodeInspectionType.MaintainabilityAndReadabilityIssues, Inspections.CodeInspectionSeverity.Suggestion);

...
return new CodeInspection[] { optionExplicit, implicitVariantReturn, implicitByRef, obsoleteComment };
}

[ConfiurationLoader](https://github.com/retailcoder/Rubberduck/blob/settingsUI/RetailCoder.VBE/Config/ConfigurationLoader.cs)

This is fine for TodoMarkers because there are only three of them, and they are highly unlikely to change. This poses a problem for CodeInspections though. There are going to be *a lot* of CodeInspections and I do not care for this. It seems necessa...
ry though, because if the config file is missing, opening and closing the SettingsDialog will create the file. It needs to have a default configuration to serialize.

Is there a reflection solution to this? Similar to what was done [here in App](https://github.com/retailcoder/Rubberduck/blob/master/RetailCoder.VBE/App.cs#L39-L53)?

private IList<IInspection> GetImplementedCodeInspections()
{
var inspections = Assembly.GetExecutingAs...
sembly()
.GetTypes()
.Where(type => type.GetInterfaces().Contains(typeof(IInspection)))
.Select(type =>
{
var constructor = type.GetConstructor(Type.EmptyTypes);
return constructor != null ? constructor.Invoke(Type.EmptyTypes) : null;
})...
.Where(inspection => inspection != null)
.Cast<IInspection>()
.ToList();

return inspections;
}
 
@Duga BAM!
 
> removed todo
> "Is there a reflection solution to this?" - absolutely! The way `App` has it, `inspections` has an instance of every type that's implementing `IInspection` in the assembly - from there you have an `IEnumerable<IInspection>`, and the default constructor will have executed, so the default value is already set - you just need to read it from the `Severity` property getter:

var inspectionNames = Assembly.GetExecutingAssembly()
.GetTypes()
...
                    .Where(type => type.GetInterfaces().Contains(typeof(IInspection)))
                           .Select(type =>
                           {
                               var constructor = type.GetConstructor(Type.EmptyTypes);
                               return constructor != null ? constructor.Invoke(Type.EmptyTypes) : null;
                           })
                          .Where(inspection => inspection != null)
           ...
           .Cast<IInspection>()
                          .Select(inspection => inspection.Name);
 
3:44 AM
ooh meta-chat!
 
> ...and that breaks the ObsoleteCommentSyntaxInspection and pretty much makes all comments impossible to inspect, because there's no CommentNode...
 
hi @Patrick!
 
Okay @Mat'sMug. I'll see if I can't figure that out.
 
@RubberDuck What should happen when I test the module?
 
Don't mind our mess @Patrick. Building a better IDE.
 
3:59 AM
Or should I ask Mat this?
Oh, it isn't testing anything.
Is it:
'@TestMethod
Public Sub TestMethod1() 'TODO: Rename test
    On Error GoTo TestFail

Arrange:

Act:

Assert:
    Assert.Inconclusive

TestExit:
    Exit Sub
TestFail:
    If Err.Number <> 0 Then
        Assert.Fail "Test raised an error: #" & Err.Number & " - " & Err.Description
    Else
        Resume TestExit
    End If
End Sub
Hmm, I've got PowerPoint almost done.
Figured out what was wrong.
 
Just change Assert.Inconclusive to Assert.IsTrue true
 
OK.
 
Then, the test should turn green if the c# code is working properly.
 
@Hosch250 once you have that code in the VBE, you can "run all tests" and there should be a result in the test explorer for that test - whatever it is (Inconclusive by default).
 
OK.
 
4:13 AM
Hmm, the Access test is failing.
PowerPoint is good though.
 
@RubberDuck wasn't there an issue about running tests in Access?
hmm.. it's checked on #112
 
Maybe I need to pull?
I just got the code tonight.
About 3 hours ago.
 
it's been checked for Access on issue #112 for quite some time...
I don't have Access, that one's for @RubberDuck :)
 
OK, working on Outlook, meanwhile.
 
> Adding a CommentNode to wrap the Instructions returned by the recursive SyntaxTreeNode.FindAllComments() method; now all bases are covered, and CodeInspectionResultBase takes a SyntaxTreeNode parameter.
 
4:22 AM
@Mat'sMug Not sure what to do here.
 
about what?
 
Outlook doesn't have a Run method, so this doesn't work: public override void Run(...){}
So what does this affect?
The tests weren't working right, but Outlook also didn't crash when I closed it.
 
hmm... it means we may need to find another way of executing VBA code...
 
So that is why the tests didn't work?
 
tests rely on Application.Run
 
4:24 AM
OK, I thought that was why it didn't work.
 
makes sense
 
It just passes everything :(
 
> To do have config changes take effect immediately, either there will need to be a global instance of Configuration or it will need to be loaded directly from the class that needs the config. App could potentially listen for changes to config and manage the object. I'm unsure of which direction to go at the moment.
 
Well, I'll do Visio and Publisher, then push.
 
If Outlook doesn't have an Application.Run method, we can't do it. Which is ok.
You won't be able to push. You'll need to submit a pull request.
 
4:28 AM
OK.
 
And don't worry about Access. I can fix that. It has a weird syntax.
 
OK.
 
But I've gotta get some shut eye. See Ya.
 
@RubberDuck you need a singleton ConfigurationManager
 
Also, I cannot do Visio because I do not have Visio, so I cannot add the required reference...
 
4:30 AM
good night!
 
See you.
@RubberDuck Publisher doesn't have a Run method either.
 
interesting. so one can write macros, but not run them? or it's just a hook on the application events?
 
I don't know?
I've seen macros in Outlook in the Office store before.
 
well at least now we know what works and what doesn't :)
 
I don't know if Visio works.
I don't have Visio installed.
 
4:36 AM
> CodeInspectionBase now takes a SyntaxTreeNode instead of an Instruction parameter.
> fixes #124
 
@Duga Pulled.
I left Publisher and Outlook in there for now.
They aren't doing any harm, and we have them if something comes up.
Ahem, @Mat'sMug Please kill that pull and don't merge it.
 
I don't see a pull request
 
OK.
@Mat'sMug Did you just give the ProgramApp classes their own file?
 
yeah
 
OK, that is the problem.
 
4:42 AM
woopsie
 
All of a sudden, it was telling me that there were duplicate classes.
I'll clean it up.
 
sorry!
 
I need to give my new classes their files, and no problem.
 
> I come with a C# perspective though; I find it cleaner when there a class per file. It gets easier to navigate your project, too
;)
4
A: Printing RPG Game Character Properties

Mat's MugMuch has been covered already, so I'll just drop a note about these comments: // -------------------------------------------------------------- These are just clutter, remove them mercilessly. I come with a C# perspective though; I find it cleaner when there a class per file. It gets easier t...

 
4:56 AM
@Mat'sMug I'm trying to submit my code, and I'm getting a 403 error.
I'm using the command line, the same as always.
Do you need to add me as a contributor or something?
 
what's your github alias?
maybe
 
user2509848
Same as my old name here.
Will go update.
 
OK, now it worked.
 
> Access, Outlook, Publisher, PowerPoint
 
4:59 AM
great!
 
> PowerPoint

Merge branch 'master' of https://github.com/retailcoder/Rubberduck

Conflicts:
RetailCoder.VBE/IHostApplication.cs
 
@Mat'sMug Just keep my latest push.
The rest were from before I had access, and they just got backlogged.
 
uh, that just went to master.
 
I thought I cloned it?
Here, let me clone it again.
 
fork it
 
5:01 AM
Oh, OK.
 
I think you can be a contributor without having full access to the repo... I think you need to fork it and then you can make a pull request
 
Yes, I can be.
Which of these commands do I need?
I hope I didn't mess anything up.
 
it's ok, I'll just resolve the conflicts and merge
 
OK, thanks.
 
5:11 AM
> [x] Implement inspection
[ ] Implement quick fix
 
Now I can't submit again, and I cloned from my own repo.
I mean, I cloned the forked repo into my computer.
 
I think you need to rebase
 
OK.
 
5:26 AM
I can't get it!
 
I'm still merging..
 
It can't connect to my repo through the commandline.
 
I've never used the commandlines
 
I have to, or I make the files get long lines of whitespace at the end.
Don't know how.
 
there was a problem with PowerPointApp.cs, OutlookApp.cs and PublisherApp.cs files, not sure I understand what happened, but they were missing.
 
5:31 AM
OK, I pasted them into my account through the browser.
 
You can get them there.
 
> implemented MultipleDeclarationsInspection & quickfix - closes #26
> merged
 
Do I have admin powers, or do you have to review everything I submit?
If the later, I'll just submit them through the browser, and you can take care of the rest.
@Mat'sMug ?
NVM, found out.
 
> [re-]added PowerPointApp, OutlookApp and PublisherApp classes into project
 
5:34 AM
OK, you found them?
 
yep
 
I was just about to give you a pull request.
Be back tomorrow, I need to leave now.
 
yeah, I need to get to sleep as well
 
Alright, see you.
 
well that was productive!
see you later!
 
5:36 AM
You too.
 
> added inspection files back into project
 
@RubberDuck @Mat'sMug I was 4 years old when this movie came out, and I'm just now hearing about it?
In any case, I had many good laughs!
(talking about Spaceballs of course)
 
haha so you watched it! nice!
 
5:54 AM
I did, indeed! I'm just flabbergasted I just now heard about it
 
> off-by-one again - multiple declarations inspection selects 1 too few characters.
 
Hmmm... ...
 
> ProcedureNodes should have an IsAssigned property that returns true when a child AssignmentNode assigns to an Identifier that matches the signature's Identifier.
 
@Phrancis yeah.. somehow I knew that one wasn't really gone.
TTGTB now
'night!
 
Night brother
Monday awaits :|
 
6:01 AM
yeah... it's already there...
 
 
6 hours later…
12:09 PM
@RubberDuck ping @Duga all you want :)
@Mat'sMug or when I remote control it and tell it to post something. It is Java after all.
 
@Phrancis I'm glad you enjoyed it. May the Schwartz be with you.
 
 
3 hours later…
@Duga What's that? A new fork?! Awesome sauce.
Oh snap! He forked VBEX too!
I really need to work on VBEX a bit.... Slacking on that.
 
00:00 - 15:0015:00 - 23:00

« first day (199 days earlier)      last day (2981 days later) »