I don't want to name .dart files using "lowercase_with_uderscores". How do I disable this warning in Dart VS Code extension? Moreover, when I rename my file to lowercase, it still shows the same warning each time I make changes to the file. Any idea on how to disable these warnings for good, not just for one file, but for the whole project? I know what's best for me, I'm just trying to code...
This is what I see:
Just comment this highlighted line of code in the analysis_options.yaml file...
Related
I have inherited development of an iPhone app that was originally created overseas. The original developers are no longer available for questions. The app is currently available on the app store. So I assume the zip file that I received of the project is current and complete.
When I first open the project in xcode and do a build, I get hundreds of errors. They are all the same basic error. There are hundreds of .h files with one line:
../../../FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/Internal/ServerConfiguration/FBSDKServerConfiguration.h
I get the error "expected identifier or '(' on the first character of this line in every file.
I tried changing the line to:
#include "/../../../xxxxxxxxx"
and that worked. But as I said, there are several hundred of these files in the project. If this was a running app 'supposedly' from this source code, why should I need to go change hundreds of files and add #include to each line?
This project uses an old version of swift, and I had to go all the way back to xCode 7 to find a development environment that would support it. Is the .h syntax in these files some sort of deprecated syntax that stems from an even older version of xCode? Can some seasoned iPhone app developer tell me about this particular .h file syntax of including another .h file (and why it's failing for me now)?
Basically, if I need to change all of the .h files, then so be it. But I'm more than a bit concerned making this drastic a change to code that supposedly recently built a running app.
Suggestion? Enlightenments? Thanks.
Jerry
The "syntax" you described -- just a single line containing a file name (with a relative path)
../../../FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/Internal/ServerConfiguration/FBSDKServerConfiguration.h
has never ever been correct C/C++/Objective C (preprocessor) syntax. Either is some strange, proprietary custom preprocessing is running, or it's just garbage.
Using
#include "/../.."
is also nonsense: If you start a path with /, you start at the root directory, so navigating up with .. will lead you to root again, and xxxxxxxxx is expected exactly there in the root directory.
This was to the syntax. The semantics is hard to tell without the project.
Maybe it might just help if you completely remove those strange header files,
or comment out the erronous lines
or you need to adjust your include paths in the project to help Xcode find the files
I made a framework, The files I chose to make public were .h and .m files. I found that if I modify the contents of the .m file directly, it won't take effect. So what should I do to take effect?
Maybe I'm misunderstanding your question, but in the abscence of other answers let's see if I can help:
I made a framework
So you wrote some text into some files; then you used a tool, probably Xcode, to invoke the compiler, which interpreted that text as Objective-C and produced machine code in another file, and then constructed a framework bundle for you.
The files I chose to make public were .h and .m files. I found that if I modify the contents of the .m file directly, it won't take effect.
So now you edit your text file, and what do you expect to happen - not sure. Do you expect the framework code to change? If so aren't you missing a step compared to the above?
So what should I do to take effect?
Well that depends on what your goal is here. If you want your users to be able to customise your framework in some way then you need to design a method to do that using whatever tools you can when iOS is your target (Apple has rules).
This answer isn't much, but hope it helps.
I am trying to add 2 swift files to my Xcode project. They are located on my desktop currently. When I open them up, they look like this:
However, when I add them to my Xcode project, they look like this:
How can I add these files without the text messing up? Thanks!
That looks suspiciously like some kind of PNG file, not a text file. ("PNG" followed by "IHDR", specifically.) Are you sure that's a Swift file and not a screenshot of a Swift file or something?
That's also a very strange title in the titlebar of your screenshot. Perhaps that is related.
Either way, seems pretty clear that these allegedly Swift files are actually some format which is not plain text. Copy the text out of it into a new file created from scratch by Xcode, and that will fix whatever the problem is.
I have two projects in an F# solution.
1. main project with [EntryPoint] and set as the StarUp project.
2. support, the second project, holds a group of support modules. I.e. they are only called and never initiate anything nor serve as the entry point nor are the StartUp project.
For the last module in the support project, compiling in Visual Studio gives
warning FS0988: Main module of program is empty; nothing will happen
when it is run
While using compiler option nowarn inline as #nowarn "988" in the module causing the warning does suppress the message I would rather add something like a dummy function with comments that resolves the issue.
How does one make such a dummy function to resolve the warning?
EDIT
Jack is correct in that my support project was setup as a Console Application instead of a Class Library. Changing to Class Library resolved the warning. It is also nice to know about do () for the other case.
EDIT
While it seemed odd that I would have set a support project as a Console Application, I recently found that for some reason when I made a change to the code in the project, something changed the Output type from Class Library to Console Application. I suspect it has to do with the F# PowerPack and it's build rules, but it's only a guess.
Are you building the support project as a Library or as a Console Application? (This is set via the project properties page.)
If you're building it as a library, then you may need to add a do() at the end of the last file in the project. This is necessary to make the F# compiler happy in a few specific scenarios, like when you create a module which contains only assembly-level attributes (because they're applied to the assembly, the module appears "empty" to the compiler).
You can see an example in my code here:
https://github.com/jack-pappas/FSharp.Compatibility/blob/master/FSharp.Compatibility.OCaml/AssemblyInfo.fs
I'm currently porting a rather big project from C++ Builder 5 to the newest version, C++ Builder XE. It's my first experience with C++ Builder. I'm stuck with an error in a file, but I don't want to include this file anyway (it's code of a component not required anymore). I was not able to find out where and how this file is included, however. The compiler error does not give any hint at all apart from the error itself. How do you usually find out where a file is included?
The preprocessor is perfect for this. Right click on the cpp file which gives you the error in the project manager then choose "preprocess"
The output from this tells you every file and line number in the order they are processed. You can then search for the file in question, and the line above it is the file that included it.
This could conceivably be another header file as well, so it could be a long chain, but you can determine exactly where it comes from.
In the Project Options, enable the compiler's general messages. When the compiler encounters an error, you will be able to see the chain of includes that lead to the erroneous code.
If the files in question are rather sizable, a tool like Doxygen can be helpful in showing you the include dependencies (as well as call paths, etc.).
If it's just once or twice you'll have to do this, David Dean's suggestion of the preprocessor is golden.