run-sonar-swift.sh with custom swiftlint .yml file - swift

i have a problem with my .yml rules. I can include them into my project, he does get the custom rules, but I cannot show them in sonarqube, because he says he does not know the rules.
can anyone help me?
my .swiftlint.yml file is in the homedirectory and I only run the run-sonar-swift.sh with swiftlint, tailor and lizard.
Thanks a lot.

To have your .yml files analyzed, you need to install an analyzer that handles that language. I'm not currently aware of any such plugin.

Related

SwiftLint Change Rules Cocoapods

I just recently installed SwiftLint using CocoaPods. I want to change the rules of my SwiftLint but when I go inside my pods -> SwiftLint, I cannot find the file named "rules" through which I can edit my rules. Please let me know how I can do the same! Thanks a lot! I really appreciate it!
You put rules unique to your project in a file called .swiftlint.yml (with the leading .) and commit this to source control. Re this file, see the Configuration section of the README.
If you haven’t done this before, you’ll have to create this file. Personally, I fire up Terminal, cd into the root directory of my project, and type touch .swiftlint.yml to create a blank file. Then go to your text editor of choice and add whatever rules you want (see the README for some examples, perhaps copy-and-paste some examples into your file).
If you go to YouTube, search for “swiftlint” and you’ll see many tutorials out there.

How to generate the plugin of "Li2018" in Halide on windows and exploit "load_plugin" in other project?

reccently, I want to test how does the autoscheduler "Li2018" work on GPU. Firstly, I need to load the plugin of this autoscheduler into my project with function "load_plugin("gradient_autoscheduler")" like the example: https://github.com/halide/Halide/blob/master/apps/gradient_autoscheduler/test.cpp but the biggest problem is, that I cannot generate the plugin on Windows. I have tried to add the "generate_autoscheduler" into the CMakeList.txt in the /apps folder, but it can not work. To compare with autoscheduler "Admas2019" which in the folder /apps/autoscheduler, "Li2018" need a CMakeList.txt to generate the dll plugin, Does some one know how to generate the plugin of "Li2018" on windows? Thanks in advance!
As you have noticed, we don't have a CMake configuration for Li's autoscheduler, so Windows is not supported yet. I'll put this in my TODO list, but contributions are always welcome. It shouldn't be hard to come up with a CMakeLists.txt based on the Makefile content.

How to read\write settings from a Visual Studio Project file using NuGet?

I'm interested in creating a NuGet package for a documentation tool I'm writing. Ideally, I'd like the user to not have to configure my tool in anyway. In order to do this, I need to be able to read some settings from the Project's .csproj or .vbproj file to get the path of the Xml documentation file generated by the compiler. I also need to add a post-build step to the project.
I've looked through their documentation but I haven't seen any mention of being able to do this. Is this possible? If so, is there any documentation or examples of this available?
Using PowerShell script, you can access the rich VS DTE object model. This allows your package to do all kind of things that NuGet doesn't have specific features for. Look at this help topic for some info on using init.ps1 or install.ps1.

How should I handle Sphinx configuration in version control?

I have a problem with my development workflow and Sphinx. I want to keep configuration file for Sphinx in version control so it's easier to manage. This means it's easier to link the file to code updates, etc ... However, the configuration file is stored in /usr/local/etc.
There are two solutions I can think of. Store the file in the repository and move it to the correct folder on deployment or recompile Sphinx to look for the file in my repository. I had a suggestion from someone to use a symlink, but that still requires a change on deployment.
Is there an elegant solution in Sphinx I'm missing?
perhaps have the /usr/local/etc/sphinx.conf file be a script that pulls the actual sphinx config from the file in your repo.
http://sphinxsearch.com/docs/current.html#rel098 scroll down to general and you'll see:
"added scripting (shebang syntax) support to config files (example: #!/usr/bin/php in the first line)"

Is there an easy way to merge Localizable.strings files?

Problem: Using genstrings to create Localizable.strings files from a project. A few weeks later, some things changed and I run genstrings again. 75% of the new file is already in the old file. How could I merge the new file with the old file, so that the old file contains all of those 25% new key-value-pairs?
I recommend Localizable Strings Merge too. I use it on my projects and it really a simple to use and powerful software.
I just found the Localization Suite. Incredible powerful tool for free. I tried it on my project and it just works. Lacks documentation though.
I use a script to run genstrings with existing translations merged automatically when I build a project. Updated strings are detected by git or another source control you use. The script supports storyboard and xib localization too.
To run the script automatically, put the script into your project root directory, and add a Run Script phase with the following line to a target build phases in your project settings.
./mergegenstrings.py PathToSourceDir
My script is based on the script in this post. I modified it to support Swift and to add the arguments.
What about 3rd party applications like BBEdit? After all Localizable.strings file is a text file. BBEdit has a find differences feature and you can merge from old to new or opposite.
If you install XCode, there is also a standard application installed to merge files called FileMerge.app, you can find it in /Developer/Applications/FileMerge.app
I'm not sure but ReSharper may help you. teake a look at it.