The PHP_CodeSniffer Github page has a very nice Code Consistency badge.
Clicking the badge takes you to a breakdown of the analysis for the ranking reported by the badge. You can also see the analysis of many packages.
I would like to include a Code Consistency badge in my own projects.
I can not find any details for how this is achieved. Perhaps it's not something that is available to any packages?
I add projects manually to that analysis site, but you can suggest a PHP project to add by opening an issue on the PHP_CodeSniffer Github project. It must be hosted on Github though, and be public.
The information I need is pretty basic. You can view the list of current projects, and their settings, here: https://github.com/squizlabs/PHP_CodeSniffer/blob/gh-pages/analysis/_assets/repos.json
The settings are:
Name: The friendly name of your project
URL: The Github path to your project
Path: The path inside your project to check (most use either the root, or src if your root has a bunch of files and dirs that should not be checked)
Ignore: Any files or directories to ignore, using one of more regexs (if your git clone is going to have code from other projects in it)
Extensions: In case you use non-standard extensions, which ones should be checked.
If you have no idea what the settings should be, you can point me to a Github repo and I can figure it out, as I've done for the vast majority of projects in the report.
Related
with the release of angular2 I actually encountered typescript, npm, ... for the first time, and I really appreciate its power, so I barely grasp the surface.
In the "development mode" I can find my way, but in the end:
Question:
I want to generate an independent folder that includes all necessary dependencies: js, css, html-files and is portable without needing npm, transpilers,... anymore. (So basically I want to copy this generated folder to a server and people can access the index.html as usually)
Problem
Setup
npm (as a module manager and build tool) npm as a build tool, npm as a build tool II
typescript (tsc as transpiler)
angular2 (with separated files for html, css), SystemJS
Needed Guideline
An (abstract) guideline for what steps to take in order to achieve the prescribed goal, namely a folder that has (all) the features and is build from the typescript files, (probably .scss-files,...) in a separate and self-contained way.
Probably I am searching for the wrong keywords but I have only found some fractions of my answers so far and I would really appreciate a list (of tutorials, or so) that I can stepwise go through. (Currently I feel lost)
I would have a look at the systemjs builder, using a build process such as gulp, gulp-inject to configure the index.html, and consitute the build like this:
build typescript files
bundle js files using systemjs in the build folder
build scss files (there must be a plugin for gulp) in the build folder
copy all html files in the build folder
inject dependencies in index.html
This is a raw answer to your question, untested, and from the top of my head, but I hope it can lead you to a solution. I have a little something in this repository.
I have some .cshtml templates I'm using to render to PDFs.
When I deploy to production they get precompiled and contain the text "This is a marker file generated by the precompilation tool, and should not be deleted!" Is there a way to tell ASP.NET not to precompile a particular subfolder? I thought maybe I could do this in web.config, but I can't find it.
I know this is 2 years old but recently I stumbled on the same problem, but since I needed the view for both MVC and e-mail I couldn't simply change the extension of the file.
Searching for solutions I found this documentation on aspnet_compiler and the -u options, that stands for Updatable, which keeps the original file intact after compilation.
In order to achieve the desired behavior I configured my publish profile as follow:
On Settings tab of Publish dialog expand the File Publish Options and check Precompile during publishing.
Click the Configure link after the checkbox and check Allow precompiled site to be updatable
Caution
Before jumping in this solution you should read carefully about the implications of this option. In the link I provided there is a Precompilation Decision Matrix to help on your decision.
I couldn't stop the views from being compiled, even by setting the build action to 'none' and turning on copy to output directory.
I ended up changing the extensions of my files to .prod, setting the content type as 'content', and setting them to open with the HTML editor in Visual Studio to get everything working the way I wanted.
I have a package I want to install. I would like the files to end up in a different directory than the installation wizard choses for them.
For example, my Sitecore copy is running at C:\SiteCore\website
The module added files to C:\SiteCore\website\Console
I would like the files to ultimately live at C:\SiteCore\website\sitecore_modules\Console
I am using Sitecore 6.5 rev 111230, but we are planning to upgrade very soon. I would like for my installed packages to migrate seamlessly once we have upgraded. For reference, the package I want to install at the moment is the Sitecore Powershell Extensions. Although, I would prefer to apply a similar method to any future packages that I install.
Is there a secret switch in the package installation process to allow me to do this? Can I do it from the package installation wizard? Is there another way to install packages?
I'm assuming I can't just change the package path and expect everything to keep working. Do I have to update a configuration somewhere (a file or inside the Sitecore CMS GUI) to make the package recognize the new file locations?
The module creator defines where files exist. If you move them you run the risk of something not working. The best idea is to ask the creator on the Marketplace page of the module.
There is no turn-key way to change this.
I guess you cand take the code from MarketPlace and you can modify it.
I don't know how exactly is the licenses with MarketPlace modules, but I think people can modify others code.
Please check on code and also on items, maybe on some fields are values for folder path.
I discovered a way to accomplish this, but it can be quite involved or even impossible, depending on the complexity and size of the package.
First of all, I did take the question to the module creator and had a very helpful and informative conversation with the creator. So thanks for that suggestion - they may even move the install location in a future release, based on my request.
The workaround is to first install the package on a system as normal. Then you figure out everything that comes with the package. For files, this is easy if your Sitecore root is under source control. For items, this is really complicated. You can search for the installed items by owner, if you had the foresight to create & use a unique user for the package installation. Or you can check the untyped files in the package that are essentially xml based item manifests.
Once you have a detailed list, you make the desired modifications to the locations. Then you recreate the package yourself using the Sitecore package designer.
This works for simple packages - I did it to one small package that I hope to get up on the Sitecore marketplace as shared source soon. And by small, I mean it was 2 files and 3 items. The package that prompted me to ask this question would not cooperate with this workaround. The included .dll had some assumptions about the file structure hard-coded into it.
The workaround I took for the more complex package was really quite basic: I just created a new source-code external to the required path. That let me wrap everything up neatly without getting medieval on the package files.
Thanks for both your answers, a very fine +1 to you.
I am using Sphinx to generate documentation for a Django project, and it is working really well. However it seems to be necessary to write the .rst files yourself, and once that is done, sphinx will compile the documentation from the docstrings when you run make HTML.
My questions is:
I am looking for the docs to reflect new additions to the project automatically without having to edit the .rst files manually.
As everything in Django always seems so simple, I find it odd that you have to create the rst files for the entire project manually, I would have thought that there is something that already exists, that automatically inspects the structure of the project, and builds the rst's from that.
I have looked at this project http://pypi.python.org/pypi/django-sphinx-autodoc/0.0 which looks promising, but I am surprised that there is not something more mature.
Since a while, Sphinx apidoc is bundled with Sphinx. This can create a full set of .rst files for you.
It becomes more of a problem if you want to document all the various django applications that you use in one site (this seems to be what you want). Sphinx apidoc wants a bunch of directories to scan for python packages.
I recently noticed I needed to reuse a build step in many projects. So I created a template where I only defined that build step, and had the projects that needed it associated with that template. That worked perfectly.
But then I realized that none of the affected projects were generating their artifacts, even though all of them were building successfully. When I went to look at the General Settings, the Artifact Paths box was grayed out and Team City told me that I could only change it inside the template!
I want my builds to have different artifact paths (some don't even generate artifacts at all), but I don't want to duplicate my build step. Is there some workaround for this?
Team City Version: 6.5.6 (build 18130)
This is how I workaround the issue:
Create a configuration parameter in the build parameters section of the template. I just call it Artifacts.
Then reference the property in the Artifacts Paths box in the template, e.g %Artifacts%
Then for each configuration which inherits the template you can override the artifacts configuration parameter with a path that is relevant.
HTH
This is an old question and apparently only affects users with TeamCity versions less than 8.1 (as pointed out in the comments to the accepted answer).
According to the offical documentation:
Since TeamCity 8.1, the following settings can now be overridden in a build configuration inherited from a template:
build number format
artifact paths
build options (hanging builds detection, status widget, number of simultaneously running builds)
VCS checkout mode
checkout directory
clean all files before build
show changes from snapshot dependencies
execution timeout
all common build failure conditions, including execution timeout